Do Data Found Error on Inserting a Record
I am working in Apex 4.0.
I'm getting this error when I click the "Create" button to insert a record.
ORA-01403: no data found
Error Unable to fetch row.
Since I'm inserting rather than fetching, why would I get this error? What do I need to do to suppress it?
Arie, thanks for the response. I suspected the automatic Row Processing might be the problem. But I did not (and still don't) know how to fix it.
Here's what's happening. The page involved is part of an insurance tracking system. At the time of annual renewal of a policy, we create a new record for the next year. This is done by including in the new record all usuable data fields from the old expiring record. I use a button to navigate to the current page (page 22 to page 22) and set values (from the old page 22) of items in the new page 22. The user then makes a couple of manual entries and then clicks the "Create" button which appears on the new page 22 since the primary key is null. The new record is then correctly inserted into the table, and the system branches back to a calling page. It is at this time that the error occurs.
ORA-01403: no data found
Error Unable to fetch row.
A database trigger gets the new primary key from a sequence generator and puts it into the record on insert. Here's the SQL on the trigger:
CREATE OR REPLACE TRIGGER "UCC_AUTO_SEQ"
BEFORE
insert on "UCC"
for each row
begin
select ucc_seq.nextval
into :new.uccseq
from dual;
end;
May be that I can fix this if you will explain to me what you mean by this: "My guess is that your page includes an ARF process and you didn’t set the return key item, or you didn’t use the RETURNING clause, so the ARF process can’t fetch the newly inserted record." Forgive my ignorance, but I do not know what a "RETURNING clause" is. I checked out the Source: Automatic Row Processing (DML) and found that the item labeled "Return Key Into Item" was blank. I put "P22_INSURESEQ" (the primary key item) into this field, but the error is still being thrown. The "Action Processed" message always appears in its own window just above the error message.
Similar Messages
-
ORA-01403: no data found error hile inserting into a table
Hi,
I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
Please someone help me. Below is the code.
CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
IS
BEGIN
IF t_array.count> 0 THEN
FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
FOR i IN t_array.FIRST..t_array.LAST
LOOP
INSERT INTO XXDL_TEST
VALUES(t_array(i).name )
END LOOP;
END IF;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
END;Thanks
AlakaIt looks like your Array is sparsely populated:
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(2) := 'B';
8 l_tab(3) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
B
C
PL/SQL procedure successfully completed.
SQL>
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(3) := 'B';
8 l_tab(4) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
DECLARE
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
You should also be using the FORALL syntax with INDICES OF. Check out The Docs -
Getting 'No Data found' Error when clicking the edit link to edit a record.
Application Express 4.2.0
Database: oracle 11g
Hi Guys
I am getting an error whenever i try to edit some of my entries by clicking the edit link, i have a composite Primary key attributes of three columns ( Budget Year ('YYYY'), Training Name('VARCHAR') and Emp Code ('VARCHAR')
Some records will load when i click Edit but some wont and return 'ORA-01403: no data found' error.
Any help will be appriciated.
Thanx
MATTHi,
Please create example about problem to apex.oracle.com and share developer login details to workspace.
Regards,
Jari -
AFTER INSERT TIGGER, ora-01403: no data found error
Hi all,
I'm trying to create a fairly simple trigger which fires after an insert on a table.
The trigger is based on a function, defined within a package. The function is as follows...
FUNCTION check_contract_length (V_playerId IN NUMBER)
RETURN BOOLEAN
IS
months NUMBER;
months2 NUMBER;
BEGIN
SELECT months_between(contract_end, contract_start), contract_length
INTO months, months2
FROM player
WHERE playerId = v_playerId;
IF months <> months2 THEN
RETURN (true);
END IF;
RETURN (false);
END check_contract_length;The trigger operates when an insert is made on to the player table, it as defined as follows...
CREATE OR REPLACE TRIGGER play_ins_con
AFTER INSERT ON player
FOR EACH ROW
DECLARE
isover BOOLEAN;
BEGIN
IF INSERTING THEN
isover := player_constr_pkg.check_contract_length(:new.playerId);
IF isover THEN
RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
END IF;
END IF;
END play_ins_con;My problem is, is that every time I try to insert a row into the player table, the trigger fires and produces a "ora-01403: no data found" error. I was under the impression that as the trigger fires after an insert, this shouldn't be a problem.
I'm also aware that this constraint can probably be implemented using a CHECK constraint, however it would be a learning curve for me to work it out this way.
Any help would be much appreciated!!
Cheers guys.I'm also aware that this constraint can probably be implemented using a CHECK constraint,
however it would be a learning curve for me to work it out this way.Starting out by doing stuff the wrong way only increases the learning curve when it comes to doing things the right way. A check constraint is definitely the best way of doing it. However, if you must do it with a trigger this is the way to go:
CREATE OR REPLACE TRIGGER play_ins_con BEFORE INSERT ON player
FOR EACH ROW
BEGIN
IF months_between(:NEW.contract_end, :NEW.contract_start) <> :NEW.contract_length
THEN
RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
END IF;
END play_ins_con;
/Incidentally, as CONTRACT_LENGTH is wholly derivable from the other columns your table structure is obviously insufficiently normalised.
Also, note that only errors between -20999 and -20000 are reserved for our use. Any other number may be used by Oracle for its own purposes.
Cheers, APC -
Hi all ,
Following code throwing no data found error.
It is working properly for IF x <> 0 condition but when count(*) is 0 then it's thrrowing error.
earlier same code working properly as our client is using this application.
code on when_button_pressed trigger:
DECLARE
user1 VARCHAR2(20);
x NUMBER(4);
BEGIN
FOR c1 IN( SELECT COUNT(*) x
FROM vinay.file_proc
WHERE sector = :sector
and block = :block1
and plot_no= :plotno
and plot_size = :plotsize)
LOOP
x := c1.x;
END LOOP;
IF x <> 0 THEN
MESSAGE('Record Exists');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF;
MESSAGE(' after if');
MESSAGE(' after if');
win_api_utility.copy_file(ltrim(rtrim(:ADRIVE1)),ltrim(rtrim(:DESTINATION)),TRUE,TRUE);
MESSAGE(' copy file');
MESSAGE(' ');
SELECT user INTO user1 FROM DUAL;
INSERT INTO vinay.file_proc values(:sector,:block1,:plotno,:plotsize,user1,sysdate);
COMMIT;
MESSAGE(' ');
CLEAR_BLOCK(NO_VALIDATE);
END;
:block2.path1:=:global.drive1;
GO_ITEM('BLOCK2.ADRIVE');Hi,
I think there is a problem with WIN_API_UTILITY.copy_file can anybody tell me if there is any restriction with this package. -
I am getting ORA-01403: no data found error while calling a stored procedur
Hi, I have a stored procedure. When I execute it from Toad it is successfull.
But when I call that from my java function it gives me ORA-01403: no data found error -
My code is like this -
SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
IF L_N_CNT >0 THEN
DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
RETURN;
ELSE
DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
INSERT INTO TLSI_SI_MAST
( CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
VALUES( R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN, R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
END IF;Hi,
I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
Regards, Gerwin -
Deferred transaction fails due to a "ORA-01403: no data found" error
I recently acticated replication between two Oracle instances.
(one being the master definition site and the other one being
a second master site).
Everything was going well until two weeks ago, when i realized
that some datas were different between the two Oracle instances.
I tried to figure out why and found that some deferred transation
failed to propagate due to a "ORA-01403: no data found" error.
Not all transaction fail, only a few.
All the errors are stored in the DEFERROR table of the second
master site, the DEFERROR table is empty in the master definition
site.
For every error, the source is the master definition site and the
destination is the second master site, which is OK because the
second master site is supposed to be "read-only". But why are the
errors stored in the DEFERROR table of the second master site
(and not in the master definition site (the source)).
Most errors occur on UPDATE statements but a few of them occur
on DELETE statements. Given the fact that the record actually is
in the second master site, how is it possible to get a
"ORA-01403: no data found" error on a delete statement ???????
I can't figure out what data cannot be found,
Thanks for your help,
Didier.What if i tell you the first transaction in error is an UPDATE
statement on a record that actually is in the destination table
in the second master site. So the data is there, it should be
found ...
I've tried an EXECUTE_ERROR on that very first transaction
in error but it doesn't work. Here's the call (as repadmin) :
begin
DBMS_DEFER_SYS.EXECUTE_ERROR (
DEFERRED_TRAN_ID => '6.42.271',
DESTINATION => 'AMELIPI.SENAT.FR'
end ;
And here's the full message :
ORA-01403: no data found
ORA-06512: at "SYS.DBMS_DEFER_SYS_PART1" line 430
ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1632
ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1678
ORA-06512: at line 2
I thought it could be because the primary key constraint on the
destination table wasn't activated but it was. Could it
be a problem with the corresponding index ?
Thanks for your help,
Didier. -
ORA-01403 No Data Found error on Update
I am having difficulty troubleshooting a form (6i) where the data can not be updated. This form was recently modified by another developer (who is no longer w/ us) and we removed a unique key from the items list in the data block, however the particular field is still contained in the table. There are no constraints on any fields in this table.
I have a button pallette in the form and when I try to update and save, I get the "No Data Found" error message. However, I know there is data in the record but I can not figure out why the error.
When I display the error, the sql code looks something like this:
UPDATE db.temp
SET P_ID=:1,S_ID=:2
WHERE ROWID=:3
I put a message in the do_key('list_values') trigger to show me the rowid but nothing comes up. I wonder if this has something to do with that and if so, why and how do I fix it?
Appreciate any direction any of you can provide in coming to a solution on this. Thank you.I don't explicitly say ROWID=:3, what I mean, I
didn't code the update query. My understanding is
that it is done behind the scenes given the items in
the data block. Ok, I couldn't tell from the post whether it was explicit or not. This is from
Oracle FAQ:
"I get 'NO DATA FOUND' errors. How does one handle this?
An ORA-1403 (No Data Found) error is signalled within a replicated environment when there is a conflict in data. Here is an illustration of what happens in most scenarios featuring this error:
Let's say we need to update a table and set column x=1 where x=9. When the first change occurs on the source database, Oracle checks to ensure that x=9. Once this transaction commits, it is queued for execution on the destination site(s). When the transaction is applied to the destinations, Oracle first check to verify that x=9 (the old value); if it does, then Oracle applies the update (update table set x = 1 where x = 9); if it does not, an entry to the DEFERROR table is logged indicating ORA-1403.
If the application is updating primary key values, one can also expect plenty "NO DATA FOUND" errors. Primary keys should NEVER be updated. If one updates primary key values, conflict resolution also becomes extremely difficult. "
Check your pll file and anywhere else you are using db.temp. Then check the the update using PLSQL. -
Should not raise no data found error
Hi Experts,
I am using select into statement in procedure and put some condition in select statement.
I want if condition failed then it sould put null in to target variable . It should not raise no data found error
e.g
select abc into v_abc from table
where cond1=cond;
if this select statement no give any record it should put null into v_abc and not raise no data found error
pls suggest something
UGYou could do...
SQL> ed
Wrote file afiedt.buf
1 declare
2 v_abc varchar2(20);
3 begin
4 SELECT
5 CASE
6 WHEN (select COUNT(*) from emp where empno = 1234) > 0 THEN
7 (select ename from emp where empno = 1234)
8 ELSE
9 null
10 END
11 INTO v_abc
12 FROM dual;
13* end;
SQL> /
PL/SQL procedure successfully completed.But that's no better than doing a check first as a seperate SQL in the PL/SQL.
I would do this... (if I really didn't want the no_data_found exception)
SQL> ed
Wrote file afiedt.buf
1 declare
2 v_abc varchar2(20);
3 begin
4 SELECT max(ename)
5 INTO v_abc
6 FROM
7 (
8 SELECT ename from emp where empno = 1234
9 UNION
10 SELECT null from dual
11 );
12 dbms_output.put_line(NVL(v_abc,'!null!'));
13* end;
SQL> /
!null!
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 declare
2 v_abc varchar2(20);
3 begin
4 SELECT max(ename)
5 INTO v_abc
6 FROM
7 (
8 SELECT ename from emp where empno = 7782
9 UNION
10 SELECT null from dual
11 );
12 dbms_output.put_line(NVL(v_abc,'{null}'));
13* end;
SQL> /
CLARK
PL/SQL procedure successfully completed.
SQL> -
Tabular Form and Link to document and No Data Found error
I have used this numerous times in an INTERACTIVE REPORT to link records out from the report to a document in a folder on our server and it works beautifully thanks to one of you guys who helped me a couple of years ago. In the column for which I want to use as a link I do the following:
LINK TEST #ISO_NUMBER#
LINK ATTRIBUTES a href=#DOC_LINK#; TARGET="_BLANK"
URL #DOC_LINK#
I've been banging my head against the wall trying to figure out why I keep getting a 'No data found' error in my TABULAR FORM. The good news is I figured out why it's happening. The bad news is I do need to link out to the documents listed in my tabular form that are saved on the server.
Is there any other way to do this?
Application Express 4.0.0.00.46
TIA,
AlexandraFinally back...
I have a tabular form that lists documents stored on one of our servers. In an interactive report I can set up a link to those docs using the document number column in the IR. I can't get it to work in the same way on the tabular form. Hopefully the steps of the catalog process will shed light on what may be the problem:
Step One
1. User1 catalogs doument using standard form (page 3) on DOC_INFO table.
2. Button on form redirects to Approval Tabular Form (for this example, page 100). This tabular form displays DOCUMENT_NUMBER (display as text saves state), APPROVER (select list), APPROVED(select list), RELEASED (select list) fields among others from DOC_APPRV_DOC table
3. Add Row adds fields in #2 above and other fields
4. User1 selects APPROVER in select list and Adds Row for all additional APPROVERS required
5. User1 hits SUBMIT button
Step Two
1. User2 opens different page but Approval Tabular Form (for this example, page 200) on same DOC_APPRV_DOC table, restricted to :P101_USERNAME
2. User2 uses APPROVED select list to approve or reject
3. User2 hits SUBMIT button
Step Three
1. User1 opens Approval Tabular Form (page 100) with User2 (and all other documents requiring approval) results
2. If rejected User1 uses Reset Approval checkbox and select list on User2's tabular form is reset
3. If approved User1 uses Released submit list and and record is deleted from User2's tabular form
The Problem
User2 ought to be able to review each of these documents on the server. In other parts of my application, an interactive report is used, I've got a case statement in the report creating the link, and have the column itself setup up so that User2 merely clicks on the DOCUMENT_NUMBER on the report and he's redirected to the document itself.
This works fine when set up the same way on the tabular form ONLY THE FIRST TIME a row is added. If I ADD ROW for any additional documents the DOCUMENT_NUMBER field on the tabular form does not populate on User1's form.
The entire process works beautifully if the link is not set up.
Note that from the standard form, the DOCUMENT_NUMBER is sent to a hidden item (default = :P3_DOCUMENT_NUMBER) in a region above the tabular form (page 100). This is then used to populate the DOCUMENT_NUMBER on the tabular form as the default value (:P200_DOCUMENT_NUMBER).
Your thoughts? Thanks in advance!
Alexandra -
Hello,
I have text item called 'store' in my form. When the user keys in a store#, it should either provide a LOV of stores (if the store already exists in my tables). Else it should simply enable a bunch of fields/blocks in the form. However, when I key in a store that does not exist in my tables, it throws the '0RA-01403: No data found' error. The exception is supposed to catch it right? why does still it show that message in the form?
Below is my code:
DECLARE
v_prop_id number;
v_user varchar2(10);
v_user_id varchar2(10) := fnd_global.user_id;
v_status boolean;
v_chk number;
BEGIN
IF :PAY_HEAD.STORE is not null THEN
IF length(:PAY_HEAD.STORE) = 5 THEN
NULL;
ELSE
IF length(:PAY_HEAD.STORE) <= 4 THEN
IF :PAY_HEAD.STORE > 6999 THEN
:PAY_HEAD.STORE := '7' || lpad(:PAY_HEAD.STORE,4,'0');
ELSE
:PAY_HEAD.STORE := '1' || lpad(:PAY_HEAD.STORE,4,'0');
END IF;
--message(:PAY_HEAD.STORE);
SELECT COUNT(*)
INTO v_chk
FROM PN_PROPERTIES_ALL
WHERE property_name like :PAY_HEAD.STORE || '%';
IF v_chk > 1 THEN
v_status := SHOW_LOV('STORE_LIST');
END IF;
END IF;
END IF;
BEGIN
SELECT property_id
into v_prop_id
FROM PN_PROPERTIES_ALL
WHERE property_name = :PAY_HEAD.STORE;
EXCEPTION
WHEN NO_DATA_FOUND THEN
message('test5');
:GLOBAL.PAY_STATUS := 0;
:GLOBAL.PROPERTY_STATUS := 'NEW';
SET_ITEM_PROPERTY('PAY_HEAD.INSERT',LABEL,'Save');
SET_ITEM_PROPERTY('PAY_HEAD.APPROVE',ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('PAY_HEAD.SUBMIT',ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.INSERT',ENABLED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('PAY_DETAIL_ACCTS',INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('PAY_DETAIL_RECON',INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('PAY_DETAIL_COMM',INSERT_ALLOWED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.ST_CITY',ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.ST_STATE',ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.LOCATION_TYPE',ENABLED,PROPERTY_TRUE);
END;
END IF;
END;Thanks,
Chiru
Edited by: Megastar_Chiru on May 3, 2010 2:57 PMIf you are able to run your Form from the Forms Builder, I suggest you turn Debug Messages on then run your form. The Debug Messages will display an Alert informing you of the trigger that is about to execute. This is a help debugging step, just don't forget to turn the Debug Message off again! :D
To turn Debug Messages on, go to Edit - > Preferences - > Runtime Tab -> Debug Messages checkbox.
If your Form is web deployed and you are unable to configure Form Builder so you can run your form locally, I suggest you work with your application server admin to temporarily enable Forms Runtime Diagnostics (FRD). Check out My Oracle Support (formerly Metalink) documents:
Forms Runtime Diagnostics (FRD) [ID 372323.1] (Forms 6i)
or
How to run Forms Runtime Diagnostics (FRD) in 10gR2 Forms. [ID 745280.1]
Craig... -
Uploading CSV using browse item ( getting no data found error )
Hi,
i am using below procedure to upload CSV into my table.
CSV is having null values in some places ex: 1,
2,0.999
3,
4,0.696
below procedure working fine when i am uploading CSV like : 1,0
2,0.999
3,0
4,0.696.
My table is having only two columns, and i am getting no data found error when uploading null values CSV file.
I went through Import data in excel to database table but no use..
Please help me on this.
Procedure
===========
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
BEGIN
-- Read data from wwv_flow_files
select blob_content into v_blob_data from wwv_flow_files
where UPDATED_BY = (select max(UPDATED_BY) from wwv_flow_files where UPDATED_BY = :APP_USER)
AND id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- Read and convert binary to char
WHILE ( v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities
v_line := substr(v_line, 1, length(v_line)-2);
v_line := REPLACE (v_line, ',', ':');
-- Convert each column separated by : into array of data
v_data_array := wwv_flow_utilities.STRING_to_table (v_line);
-- Insert data into target table
EXECUTE IMMEDIATE 'insert into table_name@Schema1 (col1,col2)
values (:1,:2)'
USING
v_data_array(1),
v_data_array(2);
-- Clear out
v_line := NULL;
END IF;
END LOOP;
END;regards
Chandran
Edited by: Chandran on Sep 26, 2012 10:52 AM
Edited by: Chandran on Sep 26, 2012 10:25 PM
Edited by: Chandran on Sep 27, 2012 1:58 AMChandran,
You can use wwv_flow_utilities.array_element to avoid no_data_found error. The function does not raise errors. So, for the line which only have one array value when you expect 2, it may be useful.
EXECUTE IMMEDIATE 'insert into table_name@Schema1 (col1,col2)
values (:1,:2)'
USING
wwv_flow_utilities.array_element(v_data_array,1),
wwv_flow_utilities.array_element(v_data_array,2);Regards,
Christina -
Streams apply having 60k no data found error
We have implemented streams recently. The configuration and streaming is happening fine. The only problem I am having is "NO DATA FOUND" error in apply.
It's uni-directional streaming
We are not really updating/deleting/inserting any row on the destination database. (both oracle).
Why am I seeing 60k Conflicts?
Is there any configuration am I missing?
How can I fix the no data found issue and make my stream 100 percent perfect real time.
Thanks in advance
PalaniPrint the transaction/LCR using print_transaction/print_lcr. Compare the old values from the LCR to values in destination database table. There must be one or more column values differ. Trace back to the root operation which is causing the value difference and fix it.
Otherwise you can configure the streams apply process not to compare the old values except keys by using DBMS_APPLY_ADM.COMPARE_OLD_VALUES. -
Weird no data found error in Pro*C
Hi,
I am getting a no data found error when I am making a query on all_constraints and all_cons_columns in my pro*C program. It is sure that the row exists.
I am writing here the block of pro*C code. The count returned by printf statement gives 7, which means 7 records are there. But the second query raise no data found exception. Please note that both the queries have same where clause. Pls suggest.
EXEC SQL SELECT count(*) INTO :count:h_count
FROM ALL_CONSTRAINTS AC,
ALL_CONS_COLUMNS ACC
WHERE AC.TABLE_NAME = ACC.TABLE_NAME
AND AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME
AND AC.TABLE_NAME = 'CDA_BOOK_STATUS';
printf(" The count of constraints is %d\n",count);
/* this raises no data found ??? **/
EXEC SQL SELECT SUBSTR(AC.TABLE_NAME,1,30) table_name,
SUBSTR(ACC.COLUMN_NAME,1,30) column_name,
SUBSTR(ACC.CONSTRAINT_NAME,1,30) constraint_name,
AC.CONSTRAINT_TYPE INTO :constraint_arr INDICATOR :h_constraint_arr
FROM ALL_CONSTRAINTS AC,
ALL_CONS_COLUMNS ACC
WHERE AC.TABLE_NAME = ACC.TABLE_NAME
AND AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME
AND AC.TABLE_NAME = 'CDA_BOOK_STATUS';Are you getting the 'NO DATA FOUND 'error when you use 4 sets of normal and indicator variables?
For example,
EXEC SQL SELECT SUBSTR(AC.TABLE_NAME,1,30) table_name,
SUBSTR(ACC.COLUMN_NAME,1,30) column_name,
SUBSTR(ACC.CONSTRAINT_NAME,1,30) constraint_name,
AC.CONSTRAINT_TYPE INTO :col1_arr INDICATOR :col1_ind,
:col2_arr INDICATOR :col2_ind,:col3_arr INDICATOR :col3_ind,:co14_arr INDICATOR :col4_ind
FROM ALL_CONSTRAINTS AC,
ALL_CONS_COLUMNS ACC
WHERE AC.TABLE_NAME = ACC.TABLE_NAME
AND AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME
AND AC.TABLE_NAME = 'CDA_BOOK_STATUS';Indicator variables may not be necessary (there may not be any null values in your select statement). -
No Data Found Error in wwv_flow_files
Hello All,
I have written a procedure to upload the .csv file data into one of my database Table. It was working fine some days back, but when I try to upload a .csv today, it gives me error "No Data Found".
This is the Query I am using to fetch the data from wwv_flow_files table:
select blob_content into v_blob_data
from wwv_flow_files
where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = UPPER(:APP_USER))
and id = (select max(id) from wwv_flow_files where updated_by = UPPER(:APP_USER));
this is returning No data found error.
Please suggest what is the problem.
Apex vesion : 4.0.1.00.03
DB: 11g
Thanks
TauceefHi Trent,
As I said, I am using this code from a long time ago, it was working fine before and I have uploaded many files using this code.
But suddenly I don't know what happen it start giving this error.
For making sure that this statement is the one which is giving "no data found" error I commented all the other select statements
and I still got no data found. So it's confirmed.
One more thing, I tried to run this code in SQL command by hard coding the :APP_USER value and this is what I got in the result:
BLOB_CONTENT
[unsupported data type]
means this code is returning something but at run time it is giving no data found.
Please suggest.
Thanks
Tauceef
Maybe you are looking for
-
Material/Serial Nbr is "Stuck" in a storage location and can not be moved
We have a situation created by my customers which has lead to a situation I have never seen before. A material/serial nbr. that is in our Returns location that can not be transfered, issued, removed, or anything via ANY MIGO movement type combinatio
-
Hi, We have a requirement for exploding delivery in outbound delivery only. Our client wants to explode the BOM in outbound delivery as they want to use BOM components only for the purpose of packing. They are not showing the BOM items in the Sales o
-
Hello Forum, I am trying to create a 16:9 slideshow in Encore DVD 2.0. The jpg images that I import as a slideshow are 1152 X 648. The monitor within Encore appears to be 4:3 aspect. How do you change the 4:3 format to 16:9 within Encore when creatin
-
When i create an apple id option none does not appear
when i create an apple id option none does not appear
-
Since last year, the Album wont show any photo. Solved! Go to Solution.