Set NLS_NUMERIC_CHARACTERS
Hello,
I have the following problem, please help me:
I have a procedure that can be run without any kind of problems on SQL*Plus 8.0.6.0 ( Oracle 9.2.0.8.0 (9i) ), regardless of how
NLS_NUMERIC_CHARACTERS is set in registry ( this being the purpose of my procedure).
In Report Builder 6.0.8.11.3 I get the following error "numeric or value error' , no matter how W variable is displayed (containing dot or comma as decimal separator)
I have to say that on compilation I get no errors.
declare
w varchar2(10) := '0,888' ;
nx number := 0;
begin
if instr(w, ',' ) > 0 then
nx := TO_NUMBER(w, '0D000', ' NLS_NUMERIC_CHARACTERS = ,.' ) ;
dbms_output.put_line('comma nx = '|| nx) ;
end if ;
if instr(w, '.' ) > 0 then
nx := TO_NUMBER(w, '0D000', ' NLS_NUMERIC_CHARACTERS = .,' ) ;
dbms_output.put_line('dot nx = '|| nx) ;
end if ;
end;
---------------------------------------------------------
I do an execute immediate but it doesn't work. Is it something like that?
EXECUTE IMMEDIATE ('alter session set nls_numeric_characters=",."')
Similar Messages
-
Hi APEX development team,
I get mad about an APEX import error which occurs maybe one time every second month.
ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.
ORA-02047: cannot join the distributed transaction in progress <pre>
begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||''''; end; </pre>I described the error really detailed inside my APEX blog. The following links will help you understanding what I tried to find a solution for it:
[APEX error ORA-20001 and ORA-02047 during application import (1)|http://apex-at-work.blogspot.com/2008/11/apex-error-ora-20001-and-ora-02047.html]
[Again import error ORA-02047: cannot join the distributed... (2)|http://apex-at-work.blogspot.com/2008/11/again-import-error-ora-02047-cannot.html]
[Solution for APEX import error ORA-20001, ORA-02047 (3)|http://apex-at-work.blogspot.com/2008/11/solution-for-apex-import-error-ora.html]
Write now I have two options to solve the error:
1. Restart Oracle Application Server
2. Wait a couple of days with the import (restart of my client computer) and it works for a while again
Apex Version: 3.1.2
DB Version: Oracle XE database under Windows
Hope there is a chance to get some help about this annoying error.
King regards,
TobiasHi Joel, Scott and the rest of the community.
I went on determine the import problem. It occurred two more times since the last post.
First time:
This time was a bit different. I wanted to create a new workspace and got the error "ORA-02047: cannot join the distributed transaction in progress" when I clicked on the button to create a new workspace after I entered all information to it.
I restarted the OAS and worked again
Second time:
During an application import the error occurred again and I tried the following things:
As data owner (only one db link exist)
ALTER SESSION CLOSE DATABASE LINK DBMS_CLRDBLINK;Result no open database links to close
As sys (all database links)
-- The following script queries the DBA_DB_LINKS view to access link information:
SELECT * FROM DBA_DB_LINKS;
-- close of all database links
ALTER SESSION CLOSE DATABASE LINK username.db_link_name;
...Result no database links open. Try of import ended with same error.
Check of apex_public_user no (open) db_links. No objects locked.
I had to restart the OAS again.
Any ideas?
Regards,
Tobias -
APEX Maps - ALTER SESSION set nls_numeric_characters
How alter session only for nls_numeric_characters in one page. I found problem in apex maps. Not working (marker and Bubles) if I use Polish Application Primary Language
I'm tryied it, but without success
begin
EXECUTE IMMEDIATE 'ALTER SESSION set nls_numeric_characters=". "';
end;
Can you help me ?I do an execute immediate but it doesn't work. Is it something like that?
EXECUTE IMMEDIATE ('alter session set nls_numeric_characters=",."') -
NLS-Setting in APEX 3.2.1
Hi all
I have installed XE-Universal 10.2 on a XP-Pro.
I have installed Apex 3.2.1 successfully in the same database.
in the registry, the value in oracle->key-xe->nls_lang as well as in all other ORACLE is AMERICAN_AMERICA.WE8ISO8859P1.
The query
select parameter,value from nls_database_parameters
where parameter in ('NLS_CHARACTERSET','NLS_LANGUAGE','NLS_TERRITORY');
shows American_America.AL32UTFS
In the Explorer-Pages of APEX, it shows "Language: de-ch"
The windows-regional-settings are German-Switzerland. But even when I change the settings to American-America the APEX still shows
(bottom left corner) "Language: de-ch".
Where is apex getting this info from and how to change?
When I try to import the OEHR-Sample-Application, it first shows "The export file has been imported successfully"
After some time with the screen showing "Installing application", it aborts with the message
ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.
ORA-01756: Anführungsstrich fehlt bei Zeichenfolge <pre>
begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||''''; end; </pre>
I had the same problem first with the installation of apex 3.2. It turned out that the problem is, that in Switzerland the Numeric
Group Separator is "'" which seems not to work, therefore i changed nls to GERMAN_GERMANY, where the group separator is ','. This worked fine.
Any help is very much appreciated.
Regards
Urs
Latest update: the same error applies when trying to install OEHR - sample application in the hosted demo environment
Edited by: user1131151 on 06.10.2009 02:04Urs,
This has been logged with development as the following bug.
BUG 9081503 - ORA-20001 & ORA-01756 : WHEN TRYING TO IMPORT APPLICATION WITH DE-CH BROWSER
Currently there is no fix as it is being worked on. However, the workaround of setting the browser to something else other than DE-CH will be just fine to get the application imported.
Regards,
Sunny Patel. -
XML generation and nls_numeric_characters
DBMS_XMLGEN generates the numbers in the xml based on the nls_numeric_characters where as DBMS_XMLQUERY always generates the numbers in a raw format.
Following is the piece of code along with the output:
****SCRIPT TO GENERATE XML USING PACKAGE DBMS_XMLQUERY******
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ALTER SESSION SET nls_numeric_characters=',.';
set serveroutput on
spool main.lst
begin
dbms_output.enable(20000000);
end;
DECLARE
queryCtx dbms_xmlquery.ctxType;
result CLOB;
l_offset number default 1;
BEGIN
queryCtx := dbms_xmlquery.newContext(
'SELECT Sum(Value) SUM FROM testxml'
result := dbms_xmlquery.getXml(queryCtx);
LOOP
exit when l_offset > dbms_lob.getlength(result);
dbms_output.put_line( dbms_lob.substr( result, 255, l_offset ) );
l_offset := l_offset + 255;
END LOOP;
dbms_xmlquery.closeContext(queryCtx);
END;
Output of the above script:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<SUM>310.6</SUM>
</ROW>
</ROWSET>
Package DBMS_XMLQUERY has generated the number in raw format though the
nls_numeric_characters is set to ',.'
****SCRIPT TO GENERATE XML USING PACKAGE DBMS_XMLGEN******
ALTER SESSION SET nls_numeric_characters=',.';
DECLARE
qryCtx DBMS_XMLGEN.ctxHandle;
result CLOB;
l_offset number default 1;
BEGIN
qryCtx := dbms_xmlgen.newContext ('SELECT Sum(Value) SUM FROM testxml');
result := DBMS_XMLGEN.getXML(qryCtx);
LOOP
exit when l_offset > dbms_lob.getlength(result);
debug_proc(dbms_lob.substr( result, 255, l_offset ));
dbms_output.put_line( dbms_lob.substr( result, 255, l_offset ) );
l_offset := l_offset + 255;
END LOOP;
END;
Output of the above script:
<?xml version="1.0"?>
<ROWSET>
<ROW>
<SUM>310,6</SUM>
</ROW>
</ROWSET>
Please note that the number in this case has been formatted based on the
NLS_NUMERIC_CHARACTERS.
Internally, we are creating the XML for a BI report. In BI Report, OPP always expect the number to be in raw format.
But DBMS_XMLGEN always generate numbers in a formatted way. Is there any option to generate the numbers in raw format using the package DBMS_XMLGEN
Thanks,
RaghuHi,
Can't you use ALTER SESSION with the separators you want?
NLS_NUMERIC_CHARACTERS = '.,' or
NLS_NUMERIC_CHARACTERS = '. 'Alternatively, you can perform an explicit conversion with TO_CHAR function, e.g. :
SELECT dbms_xmlgen.getXML('select to_char(1234.56, ''fm99999.99'') val from dual')
FROM dual; -
Issue with NLS_NUMERIC_CHARACTERS when pushing Number to OLAP
Hi,
I am using OLAP DML from PL-SQL
dbms_aw.execute('pc_discount_rate_m = ' || pc_discount_rate/100);
Wherein the 'pc_discount_rate_m' is a measure & 'pc_discount_rate' is a PL-SQL Number datatype . Runtime value of the 'pc_discount_rate' is 10. So the value pushed is 0.1
When the NLS_NUMERIC_CHARACTER - decimal marker is ',' the above DML throws error "-35188 : ORA-35188: The word = must be followed by an expression." (As in PL-SQL the value pushed is ',1' )
However this error is not coming when the NLS_NUMERIC_CHARACTER - decimal marker is '.'
How to get rid of this issue ? . Is there any way OLAP Recognize the NLS_NUMERIC_CHARACTER so that the DML will not result in error. We can not make the measure to VARCHAR2/String type.
Please help
Thanks
Joseph GeorgeHi,
I checked in my environment and got the value as '.,'. When I tried to set as you said '.' I m getting error.
Try setting to '.,' like this and then try to see if it resolves this error.
alter session set NLS_NUMERIC_CHARACTERS = '.,'
Thanks
Brijesh
Edited by: Brijesh Gaur on Sep 3, 2009 8:25 AM -
NLS_NUMERIC_CHARACTERS is incorrect for English/Canada settings
I've just installed XE on my XP sp2 machine and I can't find a way to get the session to recognize the default (and my) Regional & Language settings for English Canada. The settings are decimal point for a decimal, and comma for grouping, so NLS_NUMERIC_CHARACTERS should = '.,'.
Yet the session value for NLS_NUMERIC_CHARACTERS is a comma ',' and I have no idea where this is coming from.
Alter session appears to have no effect after running the alter session statement itself in SQL Commands:
'ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ".,"'
'Statement processed.
0.40 seconds' (note decimal point is there)
Then immediately run another SQL statement e.g. 'SELECT TO_CHAR(4000, '9G999D99') FROM DUAL;'
and the result:
4 000,00 (back to being a comma)
1 rows returned in 0,01 seconds (back to being a comma)
Now, I don't want to have to be setting session values anyway.
What could be causing XE (or Personal Edition for that matter - had the same problem with that...) to not recognize the values as defined in Control Panel -> Regional & Language Settings for English/Canada?
Note that NLS_LANG = ENGLISH_CANADA.WE8MSWIN1252. I did try changing NLS_LANG to AMERICAN_AMERICA.etc but that made no difference.
NLS_DATABASE_PARAMETERS and NLS_INSTANCE_PARAMETERS show American/America values (default for the installation?) NLS_SESSION_PARAMETERS shows English/Canada values which, other than NLS_NUMERIC_CHARACTERS, appear to be correct for my settings.
I've spent way too much time going through the docs, other semi-related forum entries and continually reconfiguring & rebooting my machine to no avail... Any help would really be appreciated!
Thanks.
MitchThanks, Faust and Sergiusz, for your replies. There were actually 2 issues to deal with here and I've resolved them both (finally!)
My initial testing was only with the XE web tools accessed via 'apex' - running a query in 'SQL Commands', and viewing a table's data in 'Object Browser'. Nothing that I changed in my XP Regional Settings (comments above noted) or as a value for NLS_LANG made any difference here.
BUT, there is one more setting that does come into play in this situation and that is in Internet Explorer itself! - version 7 in my case. Of course I had my Tools -> Internet Options -> Languages set to English (Canada) [en-CA]. Changing this setting to English (United States) [en-US] solves the problem for numeric formats within the XE web tools. (CA and US settings SHOULD give the same result...)
Testing numeric results with SQL*Plus, Toad, and via ODBC (set to use Oracle NLS settings) showed that NLS_LANG = ENGLISH_CANADA.WE8MSWIN1252 doesn't get translated properly (at least not on my computer). AMERICAN_AMERICA.WE8MSWIN1252 does, of course. They SHOULD be exactly the same when it comes to NLS_NUMERIC_CHARACTERS.
Thanks again!
M. -
Problem with nls_numeric_characters
Hi,
can any one give me the solution for the following problem.
i changed nls_numeric_characters value from default to AL16UTF16,again second time i changed to " ,." due to performance problem.
when I am taking export ,getting this error: unable to recognize character set.
Problem description:
Value of nls_numeric_characters set to ”AL16UTF16” from default NULL or Blank :- we have changed this parameter as one of the suggestion provided by our application OEM for performance tuning. This setting was done on 22 nd Oct 2011. No problem reported during after changing the parameter from database side.
Ø Value of nls_numeric_characters set to ” ., ” from ”AL16UTF16” :- after making the previous change, we observed that some small functional problem of object creation from back end started. After reporting it to Dassault Systems(OEM) they suggested to change value of nls_numeric_characters set to ”.,” from ”AL16UTF16”.
Ø We made this change on 13 th Dec 2011. This time problem of object creation got resolved but next day we observed that error “unable to recognize character set” appeared in oracle export dump logs and it failed. From that day export dump is not happening with the same error. We even tried to start the instance with some old pfile (13 th Dec 2011 and before 22 nd Dec 2011) but the same error continued.
Unable to take export dump in Oracle”
Edited by: user8403888 on Dec 22, 2011 3:03 AMThis is a poorly described problem. Please, re-post it after taking the following comments into consideration:
( i ) Due to poor formatting of your post, it is not quite clear what is the sequence of events.
( ii ) NLS_NUMERIC_CHARACTERS may be set in many different places. Where have you set it?
( iii ) Setting NLS_NUMERIC_CHARACTERS, which Oracle documents as the two-character string with the decimal and group separator, to the value "AL16UTF16" makes no sense. AL16UTF16 is a character set name and has little to with number formatting.
( iv ) When you talk about errors, you should paste the error text with some surrounding context.
( v ) Paste the full environment setting list of the export (exp) program (env >list.txt). The "unrecognized character set" problem may be unrelated to nls_numeric_characters.
( vi ) Always include version numbers! Possible problems and solutions would be different between Oracle5 and Oracle11, as you may imagine ;-)
( vii ) Always include platform information for all involved components (database, exp program)! Settings are specified differently on different platforms.
-- Sergiusz -
Query to read XML from CLOB table column
Hi
I want an SQL to get the following information extract from a CLOB table column.
MasterReport/sg:RptDef/sg:RptCell@RealDesc MasterReport/sg:RptDef/sg:RptCell@RealNum
credits 100
debits 100
Sample XML data from table column is:
<?xml version="1.0" encoding="UTF-8" ?>
<MasterReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sg="http://www.oracle.com/fsg/2002-03-20/" xsi:schemaLocation="http://www.oracle.com/2002-03-20/fsg.xsd">
<sg:LDGName>Vision Portugal</sg:LDGName>
<sg:SOBName>Vision Portugal</sg:SOBName>
<sg:DataAccessSetName>Vision Portugal</sg:DataAccessSetName>
<sg:InternalReportName>Model 30 Report</sg:InternalReportName>
<sg:CustomParam10 />
<sg:RowContext RowId="r100001">
<sg:RowName />
<sg:RowLineItem>Litigation Credits- Total amount from previous period</sg:RowLineItem>
<sg:RowDispUnit>1</sg:RowDispUnit>
<sg:RowDispFormat />
<sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
<sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
<sg:RowCurrencyType>T</sg:RowCurrencyType>
<sg:RowChangeSign>0</sg:RowChangeSign>
<sg:RowSeq>1.0000000000000</sg:RowSeq>
</sg:RowContext>
<sg:RowContext RowId="r100002">
<sg:RowName />
<sg:RowLineItem>Litigation credits- Taxed amounts from column2 for Previous period</sg:RowLineItem>
<sg:RowDispUnit>1</sg:RowDispUnit>
<sg:RowDispFormat />
<sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
<sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
<sg:RowCurrencyType>T</sg:RowCurrencyType>
<sg:RowChangeSign>0</sg:RowChangeSign>
<sg:RowSeq>2.0000000000000</sg:RowSeq>
</sg:RowContext>
<sg:ColContext ColId="c1000">
<sg:ColAmountType />
<sg:ColPeriod />
<sg:ColPerOffset />
<sg:ColChangeSign />
<sg:ColPosition />
<sg:ColSeq />
<sg:ColWidth>100</sg:ColWidth>
</sg:ColContext>
<sg:ColContext ColId="c1001">
<sg:ColName>Total</sg:ColName>
<sg:ColDescr />
<sg:ColDispUnit>1</sg:ColDispUnit>
<sg:ColUnitOfMeasure>EUR</sg:ColUnitOfMeasure>
<sg:ColLedgerCurrency>ANY</sg:ColLedgerCurrency>
<sg:ColCurrencyType>T</sg:ColCurrencyType>
<sg:ColDispFormat>999999999.99</sg:ColDispFormat>
<sg:ColAmountType>YTD-Actual</sg:ColAmountType>
<sg:ColPerOffset>0</sg:ColPerOffset>
<sg:ColAmntId>14</sg:ColAmntId>
<sg:ColParamId>-1</sg:ColParamId>
<sg:ColType>A</sg:ColType>
<sg:ColStyle>B</sg:ColStyle>
<sg:ColPeriod>10-08</sg:ColPeriod>
<sg:ColPeriodYear>2008</sg:ColPeriodYear>
<sg:ColPeriodNum>11</sg:ColPeriodNum>
<sg:ColPeriodStart>2008-10-01T00:00:00</sg:ColPeriodStart>
<sg:ColPeriodEnd>2008-10-31T00:00:00</sg:ColPeriodEnd>
<sg:ColChangeSign>0</sg:ColChangeSign>
<sg:ColHeadLine1>Totals</sg:ColHeadLine1>
<sg:ColHeadLine2 />
<sg:ColHeadLine3 />
<sg:ColHeadLine4 />
<sg:ColHeadLine5 />
<sg:ColHeadLine6 />
<sg:ColHeadLine7 />
<sg:ColHeadLine8 />
<sg:ColHeadLine9 />
<sg:ColPosition>99</sg:ColPosition>
<sg:ColSeq>1.0000000000000</sg:ColSeq>
<sg:ColWidth>14</sg:ColWidth>
</sg:ColContext>
<sg:RptDef RptId="p1001" RptDetName="Ledger=Vision PT (Vision Portugal)" RptPESegm="" RptPEVal="" RptTabLabel="Output 1 (Vision PT)">
<sg:RptLine RptCnt="p1001" RowCnt="r100001" LineRowSeq="1.0000000000000" LinCnt="l100001">
<sg:RptCell ColCnt="c1000" RealDesc="debits">debits</sg:RptCell>
<sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
</sg:RptLine>
<sg:RptLine RptCnt="p1001" RowCnt="r100002" LineRowSeq="2.0000000000000" LinCnt="l100002">
<sg:RptCell ColCnt="c1000" RealDesc="creditsd">credits</sg:RptCell>
<sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
</sg:RptLine>
</sg:RptDef>
<sg:TabCount>1</sg:TabCount>
</MasterReport>
Please help me.
Regards
Giri
Edited by: user576087 on Mar 18, 2012 11:54 PMI'm not sure if you want the values from the attribute or the element, but this should give you a good start :
SQL> alter session set nls_numeric_characters = ".,";
Session altered
SQL>
SQL> select x.*
2 from my_table t
3 , xmltable(
4 xmlnamespaces('http://www.oracle.com/fsg/2002-03-20/' as "sg")
5 , '/MasterReport/sg:RptDef/sg:RptLine'
6 passing xmltype(t.xmldoc)
7 columns type varchar2(30) path 'sg:RptCell[1]'
8 , amount number path 'sg:RptCell[2]'
9 ) x
10 ;
TYPE AMOUNT
debits 100
credits 100 -
Hi,
We have many varchar2 columns in the database which can contain, for example '24.00' (here "." is the decimal separator), but when i run the following query on my machine i got that error
SQL> select to_number('24.99') from dual;
select to_number('24.99') from dual
ORA-01722: invalid number
SQL> However, for example on other machines, it executes successfully. If i run select to_number('24*,*99') from dual , it executes successfully.
I know this can be avoided by using a mask in to_number, but i don't want this.
I tried to set the "." as the decimal separator from Control Panel -> Regional and language settings, but with no effect.
The db version is Oracle Database 11gR2 (11.2.0.2).
Thanks
Edited by: Roger22 on 28.12.2012 13:53See this demo in detail :
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select value from nls_session_parameters
2 where parameter = 'NLS_NUMERIC_CHARACTERS'
3 /
VALUE
SQL> select to_number('24.99') from dual;
TO_NUMBER('24.99')
24.99
I did not not got any error, because my 'NLS_NUMERIC_CHARACTERS' are ., Ok, what if I change it to your environment :
SQL> alter session set NLS_NUMERIC_CHARACTERS=',.';
Session altered.
SQL> select to_number('24.99') from dual;
select to_number('24.99') from dual
ERROR at line 1:
ORA-01722: invalid number
This is your error position in the question.
SQL> select to_number('24.99','99D99','nls_numeric_characters=.,') VALUE FROM DUAL;
VALUE
24,99
and this is the solution.
SQL> alter session set NLS_NUMERIC_CHARACTERS='.,';
Session altered.
SQL> select to_number('24.99') from dual;
TO_NUMBER('24.99')
24.99
SQL>If you wish that it should be ., for ever, you can say :
alter system set NLS_NUMERIC_CHARACTERS='.,' scope=spfile; and restart the database. (when ever you can take down time of the database, till then you can use alter session.. as per above command)
Regards
Girish Sharma -
Running forms 6i on client without installed runtime !
Dear proffesionals, what do you think about code below-we tried to enable our users to run applications developed in Forms 6i, without installed runtime on their machines. Is this solutions good, and why ? We installed forms6i runtime on the server, and make batch script (with code below), and make .exe file from that. Than we send link to users with locations of that .exe file? Is this way possible to run application through VPN ?
Thanks in advance,
Adnan
Code:
set ROOT_DIR=\\ip_address\
set APLIK=\\ip_address\
set ICONE=\\ip_address\
set PROGRAM=Form.fmx
set USER=username
set PASS=password
set BAZA=database_name
set path=%ROOT_DIR%;c:\dos;%PATH%
set ORACLE_HOME=%ROOT_DIR%
set path=%ORACLE_HOME%\BIN;%ROOT_DIR%;%PATH%;%ROOT_DIR%\BIN
set FORMS60=%ORACLE_HOME%\FORMS60
set FORMS60_PATH=%APLIK%
set RW60=%ORACLE_HOME%\REPORT60
set REPORTS60_PATH=%APLIK%
set API=%ORACLE_HOME%\DBS
set BROWSER60=%ORACLE_HOME%\BROWSER60
set CA_GPREFS=%ORACLE_HOME%\
set CA_UPREFS=%ORACLE_HOME%\
set CORE40=%ORACLE_HOME%\CORE40
set DE60=%ORACLE_HOME%\tools\common60
set NET80=%ORACLE_HOME%\net80
set ORA_NLS33=%ORACLE_HOME%\NLSRTL33\DATA
set DEV2000_SCCONVERT=FALSE
set DOC60=%ORACLE_HOME%\tools\doc60
set GRAPHBMP60=%ORACLE_HOME%\graph60\gwiz_bmp
set graphics60=%ORACLE_HOME%\graph60
set graphogd60=%ORACLE_HOME%\graph60\gwiz_ogd
set gsconnectdir=%ORACLE_HOME%\olap\ecf620
set gsinstalldir=%ORACLE_HOME%\olap\ece620
set gwizard60=%ORACLE_HOME%\graph60
set mm60=%ORACLE_HOME%\tools\common60
set nlsrtl33=%ORACLE_HOME%\nlsrtl33
set ocl60=%ORACLE_HOME%\graph60
set oin60=%ORACLE_HOME%\oin60
set ora_nls33=%ORACLE_HOME%\nlsrtl33\data
set oracle_jdk=%ORACLE_HOME%\jdk\
set orainfonav_docpath=%ORACLE_HOME%\oin
set otrace80=%ORACLE_HOME%\otrace80
set plsql80=%ORACLE_HOME%\plsql80
set pro80=%ORACLE_HOME%\pro80
set qt_player=OMO
set rdbms80=%ORACLE_HOME%\rdbms80
set reports_builder=rwbld60.exe
set reports_runtime=rwrun60.exe
set reports60_classpath=%ORACLE_HOME%\jdk\lib\classes.zip;%ORACLE_HOME%\REPORT60\java\jars\myreports60.jar;%ORACLE_HOME%\REPORT60\java\jars\xmlparser.jar
set reports60_express_ui=%ORACLE_HOME%\bin
set reports60_jni_lib=%ORACLE_HOME%\jdk\bin\javai.dll
set reports60_splash=TRUE
set rw60=%ORACLE_HOME%\report60
set shared_oracle_home=%ORACLE_HOME%
set tk60=%ORACLE_HOME%\tools\common60
set ui60=%ORACLE_HOME%\tools\common60
set vgs60=%ORACLE_HOME%\tools\common60
set UI_ICON=%ICONE%
set NLS_LANG=CROATIAN_CROATIA.EE8MSWIN1250
set NLS_DATE_FORMAT=DD.MM.RRRR
set NLS_NUMERIC_CHARACTERS=,.
start /separate /D%TEMP% ifrun60 module=%PROGRAM% userid=username/password@database
echo off
if not errorlevel 1 goto ok_2000
CD %TEMP%
start ifrun60 module=%PROGRAM% userid=%user%/%pass%@%baza%
if not errorlevel 1 goto ok_9x
goto error
:ok_2000
echo ---------------------
echo Application started
echo successfully
echo at OS WIN2000...!
echo ---------------------
goto end
:ok_9x
cls
echo ---------------------
echo Application started
echo successfully
echo at OS WIN9x...!
echo ---------------------
goto end
:error
cls
echo ---------------------
echo There was some
echo problems with starting
echo this application...!
echo ---------------------
goto end
:endIn order to distribute a Forms 6i application to a client you really only have three (3) choices.
1. Install the Forms Runtime on each PC (truely distributed application).
2. Deploy the application using desktop virtualization (Citrix, etc). This option requires a Virtualization server.
3. Web Deployed. (This requires the addition of an Application server and does require some type of installation on the client (the Oracle Jinitiator), but this can be automated with the Web Deployment.) Check out this link [Forms 6i Documenation|http://www.oracle.com/technology/documentation/6i_forms.html] and scroll to the bottom and view the "Oracle Forms Developer Release 6i: Deploying Forms Applications to the Web with Oracle Forms Server" document.
Hope this helps.
Craig...
If a response is helpful or correct, please mark it accordingly -
Hi , Please help to get the rows which have a character in the PFNUM column for this table
EMPNU PFNUM NAME
100 222 rat
101 a33 sanu
102 4a4 rahul
our PL/SQL is
1 DECLARE
2 i number;
3 j number;
4 t varchar2(10);
5 CURSOR ratnesh_cur IS
6 select PFNUM from employee;
7 BEGIN
8 OPEN ratnesh_cur;
9 FETCH ratnesh_cur into t;
10 FOR i IN 0..LENGTH(t)
11 loop
12 FOR j IN 0..9
13 loop
14 IF SUBSTR('t',i,1)= j THEN dbms_output.put_line(t);
15 ENDIF;
16 END LOOP;
17 END LOOP;
18 CLOSE ratnesh_cur;
19* END
20 /
END LOOP;
ERROR at line 16:
ORA-06550: line 16, column 5:
PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:
if
ORA-06550: line 19, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
following:
loopTO APC ...
<quote>Which solution is appropriate depends on the spec details.</quote>
Indeed ⦠that is why I provided a simple alternative answering the original question (my interpretation of it extrapolated from the actual data set provided) ⦠I did not comment on your reply.
But let me address your answers:
<quote>The best way of checking whether a value is numeric is to test for failure of the Oracle built-in function TO_NUMBER()</quote>
That would be too strong a statement, wouldnât it?
Let us assume a table with a varchar2 column which we know contains only alphanumeric characters ⦠2097152 rows ⦠half containing only digits ⦠half with a mix of digits, upper and lower alphabetical characters.
flip@FLOP> select count(0) from apc
2 where instr(translate(lower(v)
3 ,'abcdefghijklmnopqrstuvwxyz'
4 ,'xxxxxxxxxxxxxxxxxxxxxxxxxx'),'x') > 0
5 ;
COUNT(0)
1048576
Elapsed: 00:00:05.02
flip@FLOP> select count(0) from apc
2 where is_number(v) = 0
3 ;
COUNT(0)
1048576
Elapsed: 00:00:13.05
âis_numberâ is your function modified to return 1 (true) or 0 (false) instead of the Boolean.
Clearly a solution employing TO_NUMBER is not always the most performant way (as you seem to imply) ⦠all those context switches between SQL and PL/SQL do add up.
Soooo ⦠there is no âmost performant wayâ to check for numeric or non-numeric values for all categories of problems ⦠in fact there isnât even a universal solution ⦠one has to have some knowledge of the data domain being checked and the environment context.
So how about the â?â and '@â? ⦠Is the string â-1?123@99' numeric or not? Having modified your âis_numberâ function yet again to do âln := to_number(pv_string,'9G999G999D99');â â¦
flip@FLOP> select is_number('-1?123@99') from dual;
IS_NUMBER('-1?123@99')
0
NO.
flip@FLOP> alter session set nls_numeric_characters='@?';
Session altered.
flip@FLOP> select is_number('-1?123@99') from dual;
IS_NUMBER('-1?123@99')
1
YES.
But forget about nls settings ⦠how about â-123e2â? ⦠is this numeric or not ?
flip@FLOP> select to_number('-123e2') from dual;
TO_NUMBER('-123E2')
-12300
According to TO_NUMBER, it is numeric ⦠for the person having the knowledge of the data domain being checked that well may be a false positive.
Hope this proves the point about the universal solution and the qualities of TO_NUMBER.
As for <quote>And if the character is uppercase?</quote> ⦠this kind of flipped me ⦠looking at the link supplied by you ⦠and glancing over the implementation of âStringParseâ one could well ask: âand if the string contains lowercase?â ⦠but nobody did ⦠wouldâve been a bit too picky and outside the main technique being demonstrated.
Gabe -
I know oracle recognizes float data type into the tables, and exists a parameter in the initialization parameters named NLS_NUMERIC_CHARACTER that permits to us change the presentation format. I did it, and into the server pc now it shows me '.' as a decimal point and ',' as a group separator. So, how can i do for the clients recognize the same float data type format. Which file i have to modify, or always i have to execute the instruction: alter session set NLS_NUMERIC_CHARACTERS = ".," in every client machine?
thanks
aldemarAccording to the National Language Support Guide, available from <http://tahiti.oracle.com>, you should be able to change the value of NLS_NUMERIC_CHARACTERS in the init.ora file for the database and have that carry across to all sessions.
Justin -
Changing the format mask of a numberic field in a report
Hi,
I'm fethcing some numeric values from the DB and displaying them in the report. I'd like to use comma as the decimal separator but I can't get it to work. I'm very lost with all the NLS settings. I've tried using the format mask ad '9999990D00' but it still displays as dot as the decimal separator. What do I have to do in order to use comma as the decimal separator?
ThanksTry putting
SRW.DO_SQL('alter session set NLS_NUMERIC_CHARACTERS='', ''');
in the Before Report Trigger.
The setting might be reused for the next report if Reports is set to reuse the database connection.
To avoid this, I guess you change it back to default in the After Report Trigger.
Hope this helps!
Morten -
How to import shared components from a different workspace.
I have several workspaces / schemas (one to one relationship) in the same server.
When I try to install components exported from an application in one workspace to an application in another workspace I get an error because of the different workspace.
Source workspace/application = SCAI / 102
Target workspace/application = ACAMPO / 129
The objects in the database are identical in both schemas behind the workspaces.
Is it possible to edit the SQL file to address it to the target workspace?
I cannot see any uncommented entries in the sql referring to the application / workspace or schema name, but these two:
prompt APPLICATION 102 - SCAI
wwv_flow.g_flow_id := 129;
Will it work if i change it to
prompt APPLICATION 129 - ACAMPO
wwv_flow.g_flow_id := 129;
for instance?
Below is the SQL code of two LOVs exported.
Any help will be appreciated. I need to export not two but dozens of components and I don't want do do it manually.
================================
set define off
set verify off
set serveroutput on size 1000000
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
begin wwv_flow.g_import_in_progress := true; end;
--application/set_environment
prompt APPLICATION 102 - SCAI
-- Application Export:
-- Application: 102
-- Name: SCAI
-- Date and Time: 10:24 Thursday April 26, 2007
-- Exported By: FBARRENA
-- Flashback: 0
-- Export Type: Component Export
-- Manifest
-- LOV: A_ACREDITADOS_900_LOV
-- LOV: A_ACRED_CLIENTES_LOV
-- Manifest End
-- Version: 2.2.1.00.04
-- Import:
-- Using application builder
-- or
-- Using sqlplus as the Oracle user: FLOWS_020200
-- AAAA PPPPP EEEEEE XX XX
-- AA AA PP PP EE XX XX
-- AA AA PP PP EE XX XX
-- AAAAAAAAAA PPPPP EEEE XXXX
-- AA AA PP EE XX XX
-- AA AA PP EE XX XX
-- AA AA PP EEEEEE XX XX
prompt Set Credentials...
begin
-- Assumes you are running the script connected to sqlplus as the owner (parsing schema) of the application or as the product schema.
wwv_flow_api.set_security_group_id(p_security_group_id=>733821679136675);
end;
begin wwv_flow.g_import_in_progress := true; end;
begin
select value into wwv_flow_api.g_nls_numeric_chars from nls_session_parameters where parameter='NLS_NUMERIC_CHARACTERS';
end;
begin execute immediate 'alter session set nls_numeric_characters=''.,''';
end;
begin wwv_flow.g_browser_language := 'en-us'; end;
prompt Check Compatibility...
begin
-- This date identifies the minimum version required to import this file.
wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2006.02.24');
end;
prompt Set Application ID...
begin
-- SET APPLICATION ID
wwv_flow.g_flow_id := 102;
wwv_flow_api.g_id_offset := 0;
null;
end;
-- C O M P O N E N T E X P O R T
-- Requires Application Express 2.2 or greater
begin
wwv_flow_api.g_mode := 'REPLACE';
end;
prompt Component Export: LOV 10548119991618465
prompt ...Shared Lists of values
begin
wwv_flow_api.create_list_of_values (
p_id => 10548119991618465 + wwv_flow_api.g_id_offset,
p_flow_id => wwv_flow.g_flow_id,
p_lov_name => 'A_ACREDITADOS_900_LOV',
p_lov_query=> 'select ID_ACRED || '' '' ||NOMBRE_ACREDITADO d, ID_ACRED r'||chr(10)||
'from A_ACREDITADOS_V'||chr(10)||
'where (DESHABILITADO IS NULL OR DESHABILITADO <> ''1'') and ID_ACRED like ''900%'''||chr(10)||
'order by NOMBRE_ACREDITADO');
null;
end;
prompt Component Export: LOV 3172519822650040
prompt ...Shared Lists of values
begin
wwv_flow_api.create_list_of_values (
p_id => 3172519822650040 + wwv_flow_api.g_id_offset,
p_flow_id => wwv_flow.g_flow_id,
p_lov_name => 'A_ACRED_CLIENTES_LOV',
p_lov_query=> 'select APELLIDO_PATERNO||'' ''||APELLIDO_MATERNO||'' ''||NOMBRE d, ID_ACRED r'||chr(10)||
'from A_ACREDITADOS where ES_CLIENTE =''1'''||chr(10)||
'order by 1');
null;
end;
COMMIT;Francisco,
No, it won't work. The internal IDs of application components are all different between the two applications.
The objects in the database are identical in both schemas behind the workspaces.
This problem is not related to database objects like tables, etc.
Scott
Maybe you are looking for
-
Problem while incrementing a variable in Jasper Reports
Hi I am using Jasper Reports for designing reports. These reports will be used by my Java application. But there is problem while I am trying to increment a variable depending on some condition. Requirement: I have to display information about all th
-
Apple's new computer ? ? ?
Hello, Does anyone know this movie ? http://www.theonion.com/video/apple-introduces-revolutionary-new-laptop-with-no, 14299/ If so - what happened to this computer ? (This movie from 2009)
-
Select a Folder/File starting with a Space via Keyboard
I have just upgraded to Snow Leopard and I am having problems selecting a folder/file that starts with a space in the finder and in open/save. The problem is that it activates QuickView. In Leopard (10.5) you could override QuickView (in the Finder)
-
Hi, Can someone tell me how to configure the UWL on a federated portal? We want a central UWL (uwl of federated portal and the uwl's of the producers). How can this be achieved? I already tried the following link : http://help.sap.com/saphelp_nwesrc
-
Adding a Preloader to a Symbol, not the Stage. How?
I have a local video (not one hosted on YouTube/Vimeo) as part of a Symbol. Since it's a local video and may take a while to load once the button to load it is clicked, I'd like to add a Preloader to either the video itself, or to the Symbol. It's ea