Error (ORA-06502) when addinng a LOV-more element in a table
I created the collection. Then, I created in a table, this collection from.In the form of tables, I created 3 elements, based on the "list of (named LOV) selection.
It is ok.
LOV:
Select SN_ZVET display_value, KOD_ZVET return_value
of PLENKA
order by 1
Table (PLENKA):
KOD_ZVET NUMBER (3.0)
FN_ZVET VARCHAR2 (50 BYTE)
SN_ZVET VARCHAR2 (25 BYTE)
FIRMA_IZGOTOV VARCHAR2 (50 BYTE)
SETTING VARCHAR2 (30 BYTE)
KOD_ED_IZM NUMBER (2.0)
NAZ_ZVET NUMBER (6.3)
KOD_PVX NUMBER (2.0)
KOD_PR NUMBER (1.0)
When I added 4th element, based on the same LOV, I get error:
error report:
ORA-06502: PL/SQL: digital or value error: character string buffer too small
What evil? Why I created 3 identical items and could not created one more element (the same)?
Alex - selection lists can generate a lot of HTML code. If it exceeds 4K for all a "column in your query, or if the cumulative for all 'a line' size exceeds 32K, you will get this error. How many items in each LOV?
Scott
Tags: Database
Similar Questions
-
Request Express 4.1.1.00.23 on database of Oracle 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit - embedded Installation
I have a dynamic action (instruction) that sets out a numeric field (the rating are digital in the database and objects digital apex page too)
I want to just this value to be stored in a numeric value.
declare
number of l_return;
Start
l_return: = nvl(:P7_CURRENT_BALANCE_1,0);
Return l_return;
end;
The statement l_return: = nvl(:P7_CURRENT_BALANCE_1,0); gives the error Ora-06502
Help, please
DJFollowing what fac586 said, if you have specified a format for the P7_CURRENT_BALANCE_1 element mask, then you must consider that too when the conversion of number.
Kind regards
-
ORA-06502 when you use MAX (Column) with % TYPE
Hello
I tried to limit the problem as much as I can and have managed to isolate a particular scenario. As the structure and sensitive data, I had to come up with a scenario that I tested it and it causes the same problem occurs. The scenario is as follows
Assuming that I have a table defined as follows
CREATE TABLE TEST_TABLE (TEST_COLUMN CHAR (8 BYTES));
and the table has only one record NZ07100S
We also define a function as
CREATE OR REPLACE FUNCTION
FUNCTION GETTESTVALUE
TEST_TABLE RETURN. TYPE % TEST_COLUMN
IS
TEST_VALUE TEST_TABLE. TYPE % TEST_COLUMN;
BEGIN
SELECT MAX (TEST_COLUMN) IN TEST_VALUE TEST_TABLE;
RETURN TEST_VALUE;
END;
We ran the following command
SELECT GETTESTVALUE FROM DUAL;
and receive an error as follows
Error report:
SQL error: ORA-06502: PL/SQL: digital or value error: character string buffer too small
ORA-06512: at "GETTESTVALUE", line 6
06502 00000 - "PL/SQL: digital error or the value of %s.
However, if were to change the function of the following
CREATE OR REPLACE FUNCTION
FUNCTION GETTESTVALUE
TEST_TABLE RETURN. TYPE % TEST_COLUMN
IS
TEST_VALUE TEST_TABLE. TYPE % TEST_COLUMN;
BEGIN
SELECT TEST_COLUMN IN TEST_VALUE TEST_TABLE;
RETURN TEST_VALUE;
END;
There is no error reported and the value nz07100s is returned.
Of course, when we changed the function is
CREATE OR REPLACE FUNCTION
FUNCTION GETTESTVALUE
TEST_TABLE RETURN. TYPE % TEST_COLUMN
IS
TEST_VALUE TEST_TABLE. TYPE % TEST_COLUMN;
BEGIN
SELECT CAST (MAX (TEST_COLUMN) AS CHAR (8)) IN TEST_VALUE TEST_TABLE;
RETURN TEST_VALUE;
END;
No error is reported, and the value is returned
However, the function in question is in the use of production since 2004. We are currently a few changes to the application and imported the backup of Oracle 10 g Oracle XE. When we try to run the function, the error is thrown.
I would like to understand if this is a limitation with Oracle XE that causes this problem. It seems to me that the problem is to select the MAX value in the variable that has been set. Executing the query directly from sqlplus does not generate an error, and therefore do not feel there is an error with the SQL code. The only time that we can't get the error is with the INTO statement.
Is there a way to use the function as it has been defined in production? Why the ORA-06502 error would be thrown? It does not seem to make sense to me. Would appreciate any guidance on this.
Thanks and greetings
JegaThank you
What happens if you do this and rerun the select
SQL>alter table test_table modify test_column varchar2 (8 byte);
Edit:
You may need to open a SR with Oracle on this one
(Really, financial system on XE?)Concerning
PeterPublished by: Peter on March 4, 2009 12:58 AM
-
Passing data from attachment of DB (Blob data Type) after the CLOB data type conversion, giving the error "ORA-06502: PL/SQL: digital error or value" in the PL/SQL package. If the BLOB size 32K > it will give another error works great my procedure.
For example, I enclose my code here.
function get_base64 (p_blob_in in blob) return clob is
CLOB v_clob;
CLOB v_result;
whole v_offset;
v_chunk_size PLS_INTEGER: = 12288;
v_buffer_varchar varchar2 (32767).
v_buffer_raw raw (32767).
Start
fnd_file.put_line (fnd_file.log, 'here');
If p_blob_in is null then
Returns a null value.
end if;
DBMS_LOB.CREATETEMPORARY (v_clob, true);
fnd_file.put_line (fnd_file.log, 'here1');
v_offset: = 1;
fnd_file.put_line (fnd_file.log, 'Loop value'-| ceil (DBMS_LOB.) GetLength (p_blob_in) / v_chunk_size));
because me in 1... ceil (DBMS_LOB. GetLength (p_blob_in) / v_chunk_size) loop
DBMS_LOB. Read (p_blob_in, v_chunk_size, v_offset, v_buffer_raw);
v_buffer_raw: = utl_encode.base64_encode (v_buffer_raw);
v_buffer_varchar: = utl_raw.cast_to_varchar2 (v_buffer_raw);
DBMS_LOB. WriteAppend (v_clob, length (v_buffer_varchar), v_buffer_varchar);
v_offset: = v_offset + v_chunk_size;
end loop;
fnd_file.put_line (fnd_file.log, 'Out of the loop');
v_result: = v_clob;
fnd_file.put_line (fnd_file.log, 'V_result length' - |) DBMS_LOB. GetLength (v_result));
fnd_file.put_line (fnd_file.log, 'V_result' - | v_result);
DBMS_LOB.freeTemporary (v_clob);
Return v_result;
exception
while others then
fnd_file.put_line (fnd_file.log, 'Error based on the encode_base64' - |) SQLERRM);
Returns a null value.
end;
In my main program I call this function as below:
Main proceedings...
l_return_clob CLOB.
Begin
....
l_return_clob: = get_base64 (p_blob_in);
-In returning it gives error - ORA-06502: PL/SQL: digital error or value
end;
Then, please mark the thread ANSWERED.
-
RAISE_APPLICATION_ERROR gets ORA-06502 when a Message is of 198 characters or more
Hello
I see a problem in our 10.2.0.4 database where RAISE_APPLICATION_ERROR Gets an ORA-06502: PL/SQL: digital or value error: error string too small buffer when a value of 198 characters or more are passed in the msg parameter. The anonymous block below is an example of when the error occurs.
DECLARE
lv_error_msg VARCHAR2 (4000): = NULL;
BEGIN
-198 tank DOES NOT work.
lv_error_msg: = LPAD('$',198,'$');
IF (lv_error_msg IS NOT NULL) THEN
RAISE_APPLICATION_ERROR(-20100,lv_error_msg);
END IF;
END;
It's just a demo simple to show more or less happens in an application and not the exact code used in the application. Does anyone know why this would throw the ORA-06502 during the passage of 198 characters or more? I should be able to convey much more than that.
Thanks for any idea!
Mikeuser2486268 wrote:
SQL > midd_dba.mc_sysevent desc;Here's the answer:
ORA_SERVER_ERROR_MSG VARCHAR2 (200 CHAR)
Look at this part of the trigger:
FOR i IN 1..v_rec.ora_server_error_depth LOOP midd_dba.mc_widgets.string_together(v_rec.ora_server_error_msg,ora_server_error_msg(i)); END LOOP get_errors;
Another potential place causing the error is:
ORA_SERVER_ERROR_PARAM VARCHAR2 (200 CHAR)
a code he fill:
FOR i IN 1..v_rec.ora_server_error_num_params LOOP v_rec.ora_server_error_param:=v_rec.ora_server_error_param||i||'='||ora_server_error_param(1,i)||' '; END LOOP get_parms;
SY.
-
Error ORA-06502 in DBMS_LOB. READ
I am generating XML by use of DBMS_XMLGEN.getxml pakage and exit I store in a CLOB. Then, I read the value of the CLOB object by use of DBMS_LOB. READ for each count 32767 data. Here is my code. My LOB total length is 450755. In the loop, when it reached 393205, I get the error below.
ORA-06502: PL/SQL: digital or value error: character string buffer too small
Please let me know what can be the problemDECLARE v_xml_clob CLOB := EMPTY_CLOB(); v_lob_length INTEGER; v_index INTEGER := 1; v_read_cnt INTEGER; v_chunk VARCHAR2(32767); BEGIN o_ret_code := 0; SELECT DBMS_XMLGEN.getxml ('SELECT OBJECT_NAME, OBJECT_TYPE FROM DBS_OBJECTS') INTO v_xml_clob FROM DUAL; v_lob_length := NVL(DBMS_LOB.getlength(v_xml_clob),0); DBMS_OUTPUT.PUT_LINE('LOB Length : '||v_lob_length); v_index := 1; -- Start to read the data from CLOB object WHILE v_index <= v_lob_length LOOP DBMS_OUTPUT.PUT_LINE('IN'); v_read_cnt := 32767; DBMS_LOB.read ( v_xml_clob, v_read_cnt, v_index, v_chunk ); -- USe fnd_file.put function to place the XML data into concurrent view output fnd_file.put(fnd_file.output,v_chunk); DBMS_OUTPUT.PUT_LINE('v_index Start: '||v_index); v_index := v_index + v_read_cnt; DBMS_OUTPUT.PUT_LINE('v_index End: '||v_index); END LOOP; EXCEPTION WHEN OTHERS THEN ROLLBACK; NULL; END;
Thank youHello
I'm partly guessing here. You read from a CLOB, which means that you read 32,767 characters, not bytes.
These 32,767 characters you load into a (probably) 32767 bytes length varchar2 variable. If you use a multibyte character set you could get more than 32767 bytes in a reading.
Concerning
Peter -
Apex 4.2
I searched through the forums of the research about this error, but I do not understand what to do from here. I am writing a process that sends an e-mail when a value of the claim is made (or on a button click). Procedure is as follows:
DECLARE l_body clob; l_body_html clob; l_subject varchar2(100); BEGIN l_body := empty_clob(); l_body_html := empty_clob(); IF V('REQUEST') in ('SAVE_ME') AND :P32_PARENT_UPDATED_FL IS NOT NULL THEN l_subject := 'Survey Job Request Updated'||utl_tcp.crlf||utl_tcp.crlf; l_body := 'Update'||utl_tcp.crlf; l_body_html := '<html> <head> <style type = "text/css"> /* Can add style attributes later */ </style> </head> <body>'||utl_tcp.crlf; l_body_html := l_body_html ||'Survey Job Request has been updated.<br /><br />'||utl_tcp.crlf; l_body_html := l_body_html ||'Title: '||utl_tcp.crlf; l_body_html := l_body_html ||:P32_TITLE||utl_tcp.crlf; l_body_html := l_body_html ||'<br />Request Category : '||utl_tcp.crlf; l_body_html := l_body_html ||:P32_REQUEST_CATEGORY||utl_tcp.crlf; l_body_html := l_body_html ||'<br />Update Date: '||utl_tcp.crlf; l_body_html := l_body_html ||:P32_UPDATE_DATE||utl_tcp.crlf; l_body_html := l_body_html ||'<br />Updated By: '||utl_tcp.crlf; l_body_html := l_body_html ||:P32_LAST_EDITED_BY_USERID||utl_tcp.crlf; l_body_html := l_body_html ||'</body></html>'; END IF; :P32_CANCELLATION_REASON := l_body_html; apex_mail.send( p_to => '[email protected]', p_from => '[email protected]', p_body => l_body_html, p_body_html => l_body_html, p_subj => l_subject); END;
I added two lines to the code (lines 08 and 09) and when I run my program, I now get the error:
- ORA-21560: 3 argument is null, invalid or out of range
Without these two lines, I received the error:
ORA-06502: PL/SQL: digital error or value: specified incorrect LOB Locator
I'm not quite sure what is wrong or what I can change. There seems to be right, and in fact, it worked before. I have no idea why this error keeps popping up. Any help on that would be great. Thanks in advance.
Hello
NewApexCoder wrote:
Hmmm... good point. I think that apex_mail.send must be called inside the IF block. But in the future, I added several conditional statements, won't I need to include the apex_mail.send function in each IF block? But at the same time, there is the case that if no conditional instructions are met? Tests, when none of the conditions are true (when I had a second IF block in the code), an email would not be defined, which is correct. Could that be causing a problem however. If the IF block is not filled could he always try to send an email about anything or the l_body_html and l_subject fields have in them the garbage that causing ORA error?
If the call to the procedure of sending (it is a procedure, and not a function) many times is necessary or useful depends on exactly what you're trying to do.
For example, you can write to Santa for
- Submit a wish list
- Change of address
- Contradiction with your boss, who can you tell Santa you were mean
or any combination of these grounds. If you want to send a simple email whenever any of the conditions are met (and not send a when none are met), then you could do something like this:
DECLARE
need_to_send BOOLEAN: = FALSE;
...
BEGIN
...
IF wish_list IS NOT NULL
THEN
l_body: = l_body | ...
need_to_send: = TRUE;
END IF;
IF old_addresss <> new_address
THEN
l_body: = l_body | ...
need_to_send: = TRUE;
END IF;
IF boss_is_a_big_fat_liar
THEN
l_body: = l_body | ...
need_to_send: = TRUE;
END IF;
IF need_to_send
SO - It's the only call to send
apex_mail. Send...
In any case, the error message ' ORA-21560: argument 3 sucks...» "is pretty clear: If you have not given a value to everything you're passing as p_body, then you'd better call the procedure.
-
Problem with error ORA-06502: PL/SQL: numeric string or the error value
Hello
I use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.
ORA-06502: PL/SQL: numeric string or the error valueSD wrote:
HelloI use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.
ORA-06502: PL/SQL: numeric string or the error value
Yes, it's a mistake to dependent data.
Manage: SD
Status level: Beginner
Join date: November 21, 2001
Messages total: 289
Total Questions: 189 (183 pending)Why wasting you time here when you get rarely answers your questions?
-
Lexical parameter error: ORA-06502: PL/SQL: digital error or value
Hello
I am facing a problem with my lexical parameter. I have a requirement where I have to pass a string to the db column. I think that I am facing problem with quotes. Please find the sample code below:
: lp_trans_type: = "" AND (RSV.transaction_type <>"F" OR RSV.transaction_type is NULL);"
The report compiles suceccfully but when run from window SRS that generates an error
REP-1401: "afterpform": PL/SQL unrecoverable error occurred.
ORA-06502: PL/SQL: digital error or value
Please help me how to set up the string within a string. Or please suggest a possible solution.
Thanks in advace.
Kind regards
PrakashCheck the data type and length of lp_trans_type.
This is not the error, but will not work your query:
RSV.transaction_type "F"
You forgot the =.
Published by: InoL on July 20, 2010 12:57
-
SDO_NET. VALIDATE_NETWORK throwing error ORA-06502
I generated a network but also created a partition. Before you create the partition, I run SDO_NET. VALIDATE_NETWORK and that's fine.
I perform partitioning with the following procedures:
Both all fine, and I don't see any errors in the logs. They can be provided if necessary. Note that the meter on my partition table, after it is 0, and my BLOB table has a 1 meter.execute sdo_net.spatial_partition('LRS_NETWORK', 'LRS_NETWORK_PART', 2500, 'LRS_NETWORK_PARTITION_DIR', 'lrs_network_part.log', 'W', 1); execute sdo_net.generate_partition_blobs('LRS_NETWORK', 1,'LRS_NETWORK_PART_BLOB', true, true, 'LRS_NETWORK_PARTITION_DIR', 'lrs_network_part_blob.log', 'W', false, false);
So I now run SDO_NET. VALIDATE_NETWORK and the following errors occur when the procedure runs:
In addition, there seems to be 2 other functions without papers: SDO_NET. VALIDATE_PARTITION_INFO and SDO_NET. VALIDATE_CONSISTENCY. I was curious, so I ran to them, this is the result I get:[Error] Script lines: 1-1 -------------------------- ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "MDSYS.SDO_NET", line 2467 ORA-06512: at line 1 Script line 1, statement line 1, column 7
SDO_NET. VALIDATE_PARTITION_INFO ('LRS_NETWORK', 'TRUE')
MDSYS. SDO_NET. VALIDATE_CONSISTENCY ('LRS_NETWORK', 'TRUE')Inconsistent link_level information between partition table, and partition blob table! (min: ,max: ,count:0 ) vs. (min:1 ,max:1 ,count:1) Inconsistent total no. of nodes between node table and partition table at link_level:1! (5227 vs. 0) Partition blob table contains 1 inconsistent (partition,,link_level) pair(s) vs. partition table! Partition blob table contains 1 partition(s) with inconsistent no. of nodes vs. partition table at link_level:1! 5227 node(s) with unassigned partition_id in the partition table at link_level:1!
Not sure if I should be concerned here. FYI, I'm using Oracle 11 g 2. My network is a network space, not LRS as you might suppose. Here is the metadata for my network:Node table has 5227 node(s) while partition table has 0 node(s);
NETWORK: LRS_NETWORK
NETWORK_ID: 62
NETWORK_CATEGORY: SPACE
GEOMETRY_TYPE: SDO_GEOMETRY
NETWORK_TYPE: (null)
NO_OF_HIERARCHY_LEVELS: 1
NO_OF_PARTITIONS: 1
LRS_TABLE_NAME: (null)
LRS_GEOM_COLUMN: (null)
NODE_TABLE_NAME: LRS_NODES
NODE_GEOM_COLUMN: GEOMETRY
NODE_COST_COLUMN: COST
NODE_PARTITION_COLUMN: (null)
NODE_DURATION_COLUMN: (null)
LINK_TABLE_NAME: LRS_LINKS
LINK_GEOM_COLUMN: GEOMETRY
LINK_DIRECTION: REALIZED
LINK_COST_COLUMN: COST
LINK_PARTITION_COLUMN: (null)
LINK_DURATION_COLUMN: (null)
PATH_TABLE_NAME: LRS_PATHS
PATH_GEOM_COLUMN: GEOMETRY
PATH_LINK_TABLE_NAME: LRS_PATHS_LINKS
SUBPATH_TABLE_NAME: (null)
SUBPATH_GEOM_COLUMN: (null)
PARTITION_TABLE_NAME: LRS_NETWORK_PART
PARTITION_BLOB_TABLE_NAME: LRS_NETWORK_PART_BLOB
COMPONENT_TABLE_NAME: (null)
NODE_LEVEL_TABLE_NAME: (null)
TOPOLOGY: (null)
USER_DEFINED_DATA: THERE
EXTERNAL_REFERENCES: (null)
Thank you, TomTom,
The geometry of your node is a point LRS geometry (gtype = 3301). Point 2D geometry is of the following form:
SDO_GEOMETRY)
2001,
41104,
SDO_POINT (x, y, NULL),
NULL,
NULL));You can convert the geometry lrs in standard 2D geometry with the procedures mentioned in my previous post and see if that solves your problem.
Jack
-
Workflow PO error "ORA-06502: PL/SQL: digital error or value."
Hi guys,.
Column MAIL_STATUS of the WF_NOTIFICATIONS ERROR value
SQL > select ERROR_MESSAGE in wf_item_activity_statuses_v WHERE NOTIFICATION_ID = 1320203
ERROR_MESSAGE
--------------------------------------------------------------------------------
[WF_ERROR] ERROR_MESSAGE = 3835: error '-6502 - ORA-06502: PL/SQL: numeric or earned
e error: form of associative array is not compatible with enco session settings
untered during execution of the function Generate ' WF_XML. Generate 'event' oracl
e.apps.WF.notification.Send'. ERROR_STACK =
PO_REQAPPROVAL_LAUNCH. POREQ_SELECTOR (POAPPRV, TEST_CTX, 10150-25246)
Wf_Engine_Util.Function_Call (PO_REQAPPROVAL_LAUNCH. POREQ_SELECTOR, POAPPRV, 1015
0-25246, TEST_CTX)
Wf_Engine_Util.Execute_Selector_Function (POAPPRV, TEST_CTX, 10150-25246)
Wf_Engine_Util.Function_Call (PO_REQAPPROVAL_LAUNCH. POREQ_SELECTOR, POAPPRV, 1015
0-25246, TEST_CTX)
Wf_Engine_Util.Execute_Selector_Function (POAPPRV, TEST_CTX, 10150-25246)
Wf_Engine.CB (TESTCTX, POAPPRV:10150 - 25246:208270, :::))
Wf_Engine.oldCB (TESTCTX, POAPPRV:10150 - 25246:208270, :::))
WF_MAIL. SetContext (1320203)
WF_XML. GenerateDoc (oracle.apps.wf.notification.send, 1320203)
WF_XML. Generate (oracle.apps.wf.notification.send, 1320203)
WF_XML. Generate (oracle.apps.wf.notification.send, 1320203)
Wf_Event.setMessage (oracle.apps.wf.notification.send, 1320203, WF_XML.) Generate)
Wf_Event.dispatch_internal)
1 selected line.
OS: RHEL5.7
Database: 10.2.0.3
Applications: R12.0.4
Please help me to solve this error.
Salvation;
Please see the bulletin:
Approval Confirmation e-mail is not received by trainer - ERROR_MESSAGE = 3835 ORA-20001 ORA-6502 [ID 465146.1]
Respect of
HELIOS
-
Error ORA-00979 when you run the SQL in Oracle 11.2.0.3
Hi Oracle Experts,
I am trying to execute a SQL statement which consist of 2-3 levels of inline queries. Part of this SQL statement is as below:
When I run the level the lowest and second lowest level inline queries statements, which consists of a select field of data and functions, there is no error and capable of generating the result.SELECT "SAMPLE_RESULT"."PROPERTYID", "SAMPLE_RESULT"."QUALIFIER", ROUND(AVG(SAMPLE_RESULT.RESULT),2) avg_result, AVG(DECODE(SAMPLE.QUALITYSTATUS, 'P', 1,'F', 5)) qltystatus, TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') sampledt, TO_CHAR("SAMPLE"."SAMPLEDT",'rrrr-mm-dd') sortdate STD.stdev, getCL.cl FROM ( SELECT ROUND(stddev(INS.avg_result),2) stdev FROM ( SELECT "SAMPLE_RESULT"."PROPERTYID", "SAMPLE_RESULT"."QUALIFIER", ROUND(AVG(SAMPLE_RESULT.RESULT),2) avg_result, AVG(DECODE(SAMPLE.QUALITYSTATUS, 'P', 1,'F', 5)) qltystatus, TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') sampledt FROM "SAMPLE", "SAMPLE_RESULT", "ACTIVITY" WHERE ( "SAMPLE"."SAMPLEID" = "SAMPLE_RESULT"."SAMPLEID" ) AND ( "SAMPLE_RESULT"."TESTINSTANCE" = fn_max_instance ( sample.sampleid, sample_result.testid, sample_result.propertyid ) ) AND ( "SAMPLE"."ACTIVITYID" = "ACTIVITY"."ACTIVITYID" ) AND ( ACTIVITY.VARIANTID IN ('Sales Gas','Contaminants End') ) AND ( ACTIVITY.LOCATIONID = 'S-5003C' ) AND ( SAMPLE.EVENTID <> 'AD-HOC' ) AND ( "SAMPLE"."SAMPLESTATUS" = 'L' ) AND ( TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE (TO_CHAR(:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR( :StartDate,'dd-Mon-RRRR')) + 6 ) AND ( SAMPLE_RESULT.PROPERTYID = 'GCV' ) GROUP BY SAMPLE_RESULT.PROPERTYID, SAMPLE_RESULT.QUALIFIER, TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') ) INS ) STD, ( SELECT ROUND(AVG(INS.avg_result),2) cl FROM ( SELECT "SAMPLE_RESULT"."PROPERTYID", "SAMPLE_RESULT"."QUALIFIER", ROUND(AVG(SAMPLE_RESULT.RESULT),2) avg_result, AVG(DECODE(SAMPLE.QUALITYSTATUS, 'P', 1,'F', 5)) qltystatus, TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') sampledt FROM "SAMPLE", "SAMPLE_RESULT", "ACTIVITY" WHERE ( "SAMPLE"."SAMPLEID" = "SAMPLE_RESULT"."SAMPLEID" ) AND ( "SAMPLE_RESULT"."TESTINSTANCE" = fn_max_instance ( sample.sampleid, sample_result.testid, sample_result.propertyid ) ) AND ( "SAMPLE"."ACTIVITYID" = "ACTIVITY"."ACTIVITYID" ) AND ( ACTIVITY.VARIANTID IN ('Sales Gas','Contaminants End') ) AND ( ACTIVITY.LOCATIONID = 'S-5003C' ) AND ( SAMPLE.EVENTID <> 'AD-HOC' ) AND ( "SAMPLE"."SAMPLESTATUS" = 'L' ) AND ( TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE (TO_CHAR(:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR( :StartDate,'dd-Mon-RRRR')) + 6 ) AND ( SAMPLE_RESULT.PROPERTYID = 'GCV' ) GROUP BY SAMPLE_RESULT.PROPERTYID, SAMPLE_RESULT.QUALIFIER, TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') ) INS ) getCL, "SAMPLE", "SAMPLE_RESULT", "ACTIVITY" WHERE ( "SAMPLE"."SAMPLEID" = "SAMPLE_RESULT"."SAMPLEID" ) AND ( "SAMPLE_RESULT"."TESTINSTANCE" = fn_max_instance (sample.sampleid, sample_result.testid, sample_result.propertyid) ) AND ( "SAMPLE"."ACTIVITYID" = "ACTIVITY"."ACTIVITYID" ) AND ( ACTIVITY.VARIANTID IN ('Sales Gas','Contaminants End') ) AND ( ACTIVITY.LOCATIONID = 'S-5003C' ) AND ( SAMPLE_RESULT.PROPERTYID IN ('GCV','SG','T. Sulphur','Dew Point', 'HC Dew Pts') ) AND ( TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE(TO_CHAR (:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR(:StartDate, 'dd-Mon-RRRR')) + 6 ) GROUP BY "SAMPLE_RESULT"."PROPERTYID", "SAMPLE_RESULT"."QUALIFIER", TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy'), TO_CHAR("SAMPLE"."SAMPLEDT",'rrrr-mm-dd'), STD.stdev, getCL.cl )
But when I run the statement which refer to the alias of queries inline (STD, getCL), it prompted an error ORA-00979 not a group by expression. This happened only Oracle 11.2.0.3. If I run the statement in another version of Oracle (11 GR 1 material and below), I am able to generate the result.
Please advice how can I fix this problem.
Published by: xysOra on 29 April 2013 19:37It seems that this should be the "SAMPLE" TO_CHAR conversions "" SAMPLEDT ".
You seem to be willing to cut the time part of SAMPLEDT. The best way to do so is TRUNC (SAMPLEDT).
In each of the groups of clauses, replace TO_CHAR ('SAMPLE'. ("' SAMPLEDT ', 'dd-Mon-yyyy') with TRUNC ('SAMPLE'. (' "SAMPLEDT") and completely remove the TO_CHAR ('SAMPLE'. ("' SAMPLEDT ',"dd-mm-rrrr") in the last group of.
Replace in selection lists, TO_CHAR ('SAMPLE'. ("' SAMPLEDT ', 'dd-Mon-yyyy') with TO_CHAR (TRUNC ('SAMPLE'. ((' ' SAMPLEDT '), 'dd-Mon-yyyy') and replace TO_CHAR ("SAMPLE". "SAMPLEDT", "dd-mm-rrrr") with TO_CHAR (TRUNC ("SAMPLE" ".")) " "" "SAMPLEDT"), "dd-mm-rrrr").
These changes can take you the ORA-00979 not one group by expression.
Also the date manipulation is wrong — you do implicit conversions to date using default formats, when what you seem to want is to truncate the time part. Instead of
TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE(TO_CHAR (:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR(:StartDate, 'dd-Mon-RRRR')) + 6
use
TRUNC(SAMPLE.SAMPLEDT) BETWEEN TRUNC(:StartDate) AND TRUNC(:StartDate) + 6
I hope this helps.
David -
Table binding error ORA-01485 when I try to get in an associative array
Hello
I test to pass in an array associative odp.net
So I created a simple testpackage:
CREATE TABLE jwetesttab (CLIENTNR NUMBER (10) NOT NULL);
CREATE OR REPLACE PACKAGE IN THE JWETEST_PK
TYPE t_CLIENTNRS IS TABLE OF NUMBER INDEX OF PLS_INTEGER;
PROCEDURE TestArrayIn (p_CLIENTNRS IN t_CLIENTNRS, p_NbOfRowsInserted OUT NUMBER);
END JWETEST_PK;
/
CREATE OR REPLACE PACKAGE BODY JWETEST_PK AS
PROCEDURE TestArrayIn (p_CLIENTNRS IN t_CLIENTNRS, p_NbOfRowsInserted ON the NUMBER)
IS
BEGIN
FORALL i IN p_CLIENTNRS.first... p_CLIENTNRS. Last
INSERT INTO jwetesttab (CLIENTNR) VALUES (p_CLIENTNRS (i));
p_NbOfRowsInserted: = SQL % ROWCOUNT;
COMMIT;
END TestArrayIn;
end JWETEST_PK;
/
Then I did as simple testapp as follows:
Protected Int As Integer = 0
Dim arrNums() As Integer = {1, 2, 3}
Dim cmd As New OracleCommand
Dim cnn as new OracleConnection (s_conn)
Try
With cmd
. ArrayBindCount = 3
. Connection = cnn
. CommandText = "JWETEST_PK. TestArrayIn ".
. CommandType = CommandType.StoredProcedure
Var p_Clientnrs As OracleParameter = New OracleParameter
With p_Clientnrs
. ParameterName = "p_CLIENTNRS."
. DbType = DbType.Int32
. CollectionType = OracleCollectionType.PLSQLAssociativeArray
. Value = arrNums
. Size = 3
Ends with
. Parameters.Add (p_Clientnrs)
. Parameters.Add (New OracleParameter ("p_NbOfRowsInserted", OracleDbType.Int32, ParameterDirection.Output))
CNN. Open()
cmd ExecuteNonQuery()).
Int = CInt (.) Parameters ("p_NbOfRowsInserted"). Value)
Ends with
Catch ex As Exception
MsgBox (ex.) Message)
Finally
If (cnn IsNot Nothing) = False Then
CNN. Close()
CNN. Dispose()
End If
End Try
When I run my testapp, the lines are inseterd in the database, but it gives me an error: link table error: ORA-01485Liaison of the table and the associative arrays are two different functions and tend to confuse because they both have the word Array in them.
The table binding is for "run this procedure and statement number X times, all the data here is at the front. ''
Associative array is to "perform this procedure once, here is the table I want to that you pass in.Start by removing ArrayBindCount = 3and see if that helps
If you still have problems, see the example of associative array on your hard disk to %OH%\ODP.NET\samples\2.x\AssocArray
It will be useful,
Greg -
Error ORA-01422 apex: exact fetch returns more than the required number of line
Hi people,
Apex 4.1
I have a page that works like a charm.
Based on my application I need I have to perform the same operation for the different regions. As a quick and better method, I copied the page and branched, it inspires tab for this region.
The problem is that the original page works fine.
I haven't changed anything except the parent set to this copied page tab and works that I find with the above error.
It allows me to make the first entry on this page, but when I try to access the page again it gives me this error.
The error in detail is as below:
is_internal_error: false
ora_sqlcode:-1422
ora_sqlerrm: ORA-01422: exact fetch returns more than number of lines
Component.type: APEX_APPLICATION_PAGE_PROCESS
Component.ID: 214936714355373108
Component.Name: EMP_LEAVE_INFO line
error_backtrace:
ORA-06512: at line 1
ORA-06512: at "SYS." DBMS_SYS_SQL", line 1926
ORA-06512: at "SYS." WWV_DBMS_SQL', line 973
ORA-06512: at "SYS." WWV_DBMS_SQL', line 999
ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 806
ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 336
ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 332>
As a quick and better method, I copied the page and branched, it inspires tab for this region.
>Copy paste is never advisable. It can be fast in some cases, there is an anti-pattern.
Be aware that the automatic extraction of the APEX line is based on a component of demand.
It is possible that your automatic rowfetch is based on the element of your previous page. If you for example to change the name of the table, but do not change the reference is the primary key value, then you can pass a value to your table that was not unique. This would result in ORA-01422.
Find the value of the session element and run your query.
Concerning
Nico
-
Error ORA-20001 when you create a new application
Hello
I am creating a new application of an existing table in the database and I get the following error. The application is created using the Wizard (type of database application, from scratch, report and our page)
ORA-20001: unable to create modules. ORA-20001: create error pages. ORA-20001: unable to create form page. ORA-20001: Error Page = 2 item = 'P2_NON_ORACLE_EMPLOYEE_SPEAKER' id = '1975288532127294112' ORA-20001: error page 2 item = = "P2_NON_ORACLE_EMPLOYEE_SPEAKER" id = "1975288532127294112" a same name something like existing at the level of applications. ORA-0000: normal end successfully
The table I created the app on is defined as follows:
I use APEX version 4.0.2.00.07CREATE TABLE "TABLE_1" ( "ID" NUMBER, "SESSION_EXTERNAL_PAPER" VARCHAR2(30), "OWNER_CFP_SUBMITTER1_FULL_NA" VARCHAR2(255), "OWNER_CFP_SUBMITTER1_COMPANY" VARCHAR2(255), "STATUS" VARCHAR2(30), "SESSION_ID" NUMBER, "TITLE" VARCHAR2(255), "ABSTRACT" VARCHAR2(4000), "SESSION_TYPE" VARCHAR2(30), "SESSION_CATEGORY" VARCHAR2(30), "STREAM" VARCHAR2(30), "PRIMARY_TRACK" VARCHAR2(255), "OPTIONAL_TRACK" VARCHAR2(255), "CROSS_STREAM_TRACK" VARCHAR2(30), "SUPPORTING_VIDEO" VARCHAR2(4000), "ATTENDEE_ROLE" VARCHAR2(255), "TO_RATING" VARCHAR2(30), "TO_COMMENTS" VARCHAR2(4000), "COMMENTS" VARCHAR2(4000), "ORACLE_PARTNERNETWORK" VARCHAR2(30), "IS_YOUR_OPN_MEMBERSHIP_UNDER_A" VARCHAR2(255), "ORACLE_PARTNER_TYPE" VARCHAR2(255), "OPN_MEMBERSHIP_LEVEL" VARCHAR2(30), "ORACLE_REGION_BASED" VARCHAR2(30), "ORACLE_VALIDATED_INTEGRATION" VARCHAR2(30), "HAS_YOUR_COMPANY_ACHIEVED_SPEC" VARCHAR2(4000), "PLEASE_DESCRIBE_THE_VALUE_OF_O" VARCHAR2(4000), "INCLUDE_CASE_STUDY" VARCHAR2(30), "PROVIDE_NAME_OF_THE_CUSTOMER_F" VARCHAR2(255), "PLEASE_PROVIDE_A_BRIEF_DESCRIP" VARCHAR2(4000), "NON_ORACLE_EMPLOYEE_SPEAKER1_F" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER1_C" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER1_FULL" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER1_COMPA" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER2_F" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER2_C" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER2_FULL" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER2_COMPA" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER3_F" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER3_C" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER3_FULL" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER3_COMPA" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER4_F" VARCHAR2(255), "NON_ORACLE_EMPLOYEE_SPEAKER4_C" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER4_FULL" VARCHAR2(255), "ORACLE_EMPLOYEE_SPEAKER4_COMPA" VARCHAR2(255), "CREATED" DATE, "CREATED_BY" VARCHAR2(50), "LAST_UPDATE" DATE, "LAST_UPDATED_BY" VARCHAR2(50), CONSTRAINT "OOW_PAPER_PK" PRIMARY KEY ("ID") ENABLE ) ;
Any idea what could be wrong and what can be done to solve the problem?
See you soon,.
AndyIf you add a synonym for display to the database, the generator must see and allow you to use...
Thank you
Tony Miller
Webster, TXNever argue with a fool. They do you drag down to their level, then beat you with experience.
If you answer this question, please mark the thread as closed and give points where won...
Maybe you are looking for
-
How can I change the contrast of the display of my email inbox?
I use gmail and the contrast on the page of the Inbox is very weak - can't see the black lines, for example, and when a line is highlighted it appears barely. How can I adjust the contrast of the screen?
-
Satellite M40-231: Windows needs the battery under XP Pro drivers
Hello I formatted my drive and installed win xp pro and I installed all the tools and the drivers from the cd drivers and tools, but the windows said that battery drivers are not installed.I don't know what do yet. The energy saver is installed, and
-
Satellite P300 - 1 year PSPCCE - where can I find the USB2 drivers?
Where can I find the usb2 drivers?TOSHIBA P300-1 YEAR SATELLIPE PSPCCE?
-
Satellite M70-147: graphics card drivers required
Anyone have any idea when they will release the new drivers because I already have problems with some games because I have old drivers and even Ati mobility drivers does not work because I sort out equipment protection system on my laptop. And Yes, I
-
I have a VPN site-to-site existing on Azure and Azure a new subnet created on the local network that must be able to reach. I added the new subnet within azure for the VPN and add a static route on the RRAS server win 2012 for routing. On the initial