Data insert error..!
Hi, this is my map image..!
under main root i have two roots elements lets assume
root
import and export(record)
mvmnt_leg_count (element)
group_import_and_export(record)
sub_group_xxx
mvmnt_id
i mapped like above to sql schemas...!
i am getting error while group_import_and_export(record) doesn't have sub recode..!
getting this error
The adapter failed to transmit message going to send port "SendPortForSql" with URL "mssql://xxxx//CVM_Testnet_DryRun20140122_CSD?". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.InvalidCastException:
Failed to convert parameter value from a String to a IEnumerable`1. ---> System.InvalidCastException: Invalid cast from 'System.String' to 'System.Collections.Generic.IEnumerable`1[[System.Data.Common.DbDataRecord, System.Data, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]]'.
can any one help in this
Thanks
So I'd suggest you do a conditional matching for that record. The condition being that "group import and export" child count is NOT ZERO. Use the Record Count functoid in a combination of logical functoids to create the destination structure. Refer
http://msdn.microsoft.com/en-us/library/ee253826(v=bts.10).aspx
If however in the source you're likely to ONLY get one instance (which seems to be the case as your source is a string) then use the Logical Existence function for the same purpose. Refer
http://msdn.microsoft.com/en-us/library/aa559386.aspx
Regards.
Similar Messages
-
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 -
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. -
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 -
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. -
Data access error during workflow- import in FDM
I am trying to perform import in FDM.But getting 'Data Access Error'.
Any suggestions on this......Hello,
I have the same problem.
Can anyone help.
Here is the log error:
** Begin FDM Runtime Error Log Entry [2009-01-30-12:44:44] **
ERROR:
Code......................................... -2147217900
Description.................................. ORA-06550: line 2, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 2, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 3, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 3, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 4, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 5, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 5, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 6, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 6, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 7, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 7, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 8, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 8, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 9, column 13:
PL/SQL: ORA-00913: too many values
ORA-06550: line 9, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 10, column 13:
BEGIN
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 45645656,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 456546564,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 4556465454,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 546,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 654,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 546,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 654,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 564,00);
INSERT INTO tWselhou3242683022 (PartitionKey, CatKey, PeriodKey, DataView, Account, Entity, ICP, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, UD9, UD10, UD11, UD12, UD13, UD14, UD15, UD16, UD17, UD18, UD19, UD20, Desc1, Desc2, Attr1, Attr2, Attr3, Attr4, Attr5, Attr6, Attr7, Attr8, Attr9, Attr10, Attr11, Attr12, Attr13, Attr14, MemoKey, Amount ) VALUES (752, 12, '20090131', 'YTD', 'Required Field Missing.', 'Required Field Missing.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 564,00);
END;
Procedure.................................... clsDataManipulation.fExecuteDML
Component.................................... upsWDataWindowDM
Version...................................... 931
Thread....................................... 268
IDENTIFICATION:
User......................................... selhouda
Computer Name................................ FR900VM0044
App Name..................................... test
Client App................................... WebClient
CONNECTION:
Provider..................................... ORAOLEDB.ORACLE
Data Server..................................
Database Name................................ PARHYPT3.WORLD
Trusted Connect.............................. False
Connect Status.. Connection Open
GLOBALS:
Location..................................... LOCATION4
Location ID.................................. 752
Location Seg................................. 6
Category..................................... WLCAT
Category ID.................................. 12
Period....................................... janv - 2009
Period ID.................................... 31/01/2009
POV Local.................................... False
Language..................................... 1033
User Level................................... 1
All Partitions............................... True
Is Auditor................................... False
** Begin FDM Runtime Error Log Entry [2009-01-30-12:44:44] **
ERROR:
Code......................................... -2147217900
Description.................................. Data access error.
Procedure.................................... clsImpDataPump.fProcessSQLInsertValues
Component.................................... upsWObjectsDM
Version...................................... 931
Thread....................................... 268
IDENTIFICATION:
User......................................... selhouda
Computer Name................................ FR900VM0044
App Name..................................... test
Client App................................... WebClient
CONNECTION:
Provider..................................... ORAOLEDB.ORACLE
Data Server..................................
Database Name................................ PARHYPT3.WORLD
Trusted Connect.............................. False
Connect Status.. Connection Open
GLOBALS:
Location..................................... LOCATION4
Location ID.................................. 752
Location Seg................................. 6
Category..................................... WLCAT
Category ID.................................. 12
Period....................................... janv - 2009
Period ID.................................... 31/01/2009
POV Local.................................... False
Language..................................... 1033
User Level................................... 1
All Partitions............................... True
Is Auditor................................... False
** Begin FDM Runtime Error Log Entry [2009-01-30-12:44:44] **
ERROR:
Code......................................... -2147217900
Description.................................. Data access error.
Procedure.................................... clsImpDataPump.fImportTextFile
Component.................................... upsWObjectsDM
Version...................................... 931
Thread....................................... 268
IDENTIFICATION:
User......................................... selhouda
Computer Name................................ FR900VM0044
App Name..................................... test
Client App................................... WebClient
CONNECTION:
Provider..................................... ORAOLEDB.ORACLE
Data Server..................................
Database Name................................ PARHYPT3.WORLD
Trusted Connect.............................. False
Connect Status.. Connection Open
GLOBALS:
Location..................................... LOCATION4
Location ID.................................. 752
Location Seg................................. 6
Category..................................... WLCAT
Category ID.................................. 12
Period....................................... janv - 2009
Period ID.................................... 31/01/2009
POV Local.................................... False
Language..................................... 1033
User Level................................... 1
All Partitions............................... True
Is Auditor................................... False
** Begin FDM Runtime Error Log Entry [2009-01-30-12:44:44] **
ERROR:
Code......................................... -2147217900
Description.................................. Data access error.
Procedure.................................... clsImpProcessMgr.fLoadAndProcessFile
Component.................................... upsWObjectsDM
Version...................................... 931
Thread....................................... 268
IDENTIFICATION:
User......................................... selhouda
Computer Name................................ FR900VM0044
App Name..................................... test
Client App................................... WebClient
CONNECTION:
Provider..................................... ORAOLEDB.ORACLE
Data Server..................................
Database Name................................ PARHYPT3.WORLD
Trusted Connect.............................. False
Connect Status.. Connection Open
GLOBALS:
Location..................................... LOCATION4
Location ID.................................. 752
Location Seg................................. 6
Category..................................... WLCAT
Category ID.................................. 12
Period....................................... janv - 2009
Period ID.................................... 31/01/2009
POV Local.................................... False
Language..................................... 1033
User Level................................... 1
All Partitions............................... True
Is Auditor................................... False -
Hi,
I have a file where fields are wrapped with ".
=========== file sample
"asdsa","asdsadasdas","1123"
"asdsa","asdsadasdas","1123"
"asdsa","asdsadasdas","1123"
"asdsa","asdsadasdas","1123"
==========
I am having a .net method to remove the wrap characters and write out a file without wrap characters.
======================
asdsa,asdsadasdas,1123
asdsa,asdsadasdas,1123
asdsa,asdsadasdas,1123
asdsa,asdsadasdas,1123
======================
the .net code is here.
========================================
public static string RemoveCharacter(string sFileName, char cRemoveChar)
object objLock = new object();
//VirtualStream objInputStream = null;
//VirtualStream objOutStream = null;
FileStream objInputFile = null, objOutFile = null;
lock(objLock)
try
objInputFile = new FileStream(sFileName, FileMode.Open);
//objInputStream = new VirtualStream(objInputFile);
objOutFile = new FileStream(sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString(), FileMode.Create);
//objOutStream = new VirtualStream(objOutFile);
int nByteRead;
while ((nByteRead = objInputFile.ReadByte()) != -1)
if (nByteRead != (int)cRemoveChar)
objOutFile.WriteByte((byte)nByteRead);
finally
objInputFile.Close();
objOutFile.Close();
return sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString();
==================================
however when I run the bulk load utility I get the error
=======================================
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).
==========================================
the bulk insert statement is as follows
=========================================
BULK INSERT Temp
FROM '<file name>' WITH
FIELDTERMINATOR = ','
, KEEPNULLS
==========================================
Does anybody know what is happening and what needs to be done ?
PLEASE HELP
Thanks in advance
VikramTo load that file with BULK INSERT, use this format file:
9.0
4
1 SQLCHAR 0 0 "\"" 0 "" ""
2 SQLCHAR 0 0 "\",\"" 1 col1 Latin1_General_CI_AS
3 SQLCHAR 0 0 "\",\"" 2 col2 Latin1_General_CI_AS
4 SQLCHAR 0 0 "\"\r\n" 3 col3 Latin1_General_CI_AS
Note that the format file defines four fields while the fileonly seems to have three. The format file defines an empty field before the first quote.
Or, since you already have a .NET program, use a stored procedure with table-valued parameter instead. I have an example of how to do this here:
http://www.sommarskog.se/arrays-in-sql-2008.html
Erland Sommarskog, SQL Server MVP, [email protected] -
ORA-29400: data cartridge error/IMG-00703: unable to read image data error
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
ORA-29400: data cartridge error
IMG-00703: unable to read image data
ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 75
ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 65
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 37
ORA-06512: at "ORDSYS.ORDIMAGE", line 927
is raised when the following trigger is processing certain JPGs (example). Other JPGs are handled as expected:
create or replace trigger photo_size_trg
before insert or update on photos
for each row
declare
photo_width integer;
begin
-- Check to see if the new photograph is different from the old one... --
if dbms_lob.compare(:old.photo, :new.photo) != 0
then
-- ...if so, check to see if it's wider than the desired 250 pixel --
-- maximum... --
photo_width := to_number(ordImage.getMetadata(:new.photo)(1).extract('/ordImageAttributes/width/text()').getStringVal());
if photo_width > 250
then
-- ...and if so, apply an image transform that will resize to the photo --
-- to a maximum of 250 pixels wide, keeping the original aspect ratio. --
-- There doesn't seem to be an elegant way of specifying a constraint --
-- in one dimension like this, so the height is specifed as a large --
-- enough value to cover all practical contingencies. --
ordImage.process(:new.photo, 'maxScale=250 10000');
end if;
end if;
end;Any thoughts/suggestions?hi,
I am getting following error,kindly help me out to rectify this ..
thank you
ORA-29400: data cartridge error
ORA-00600: internal error code, arguments: [kokbCollTerminate], [13], [], [], [], [], [], [] -
750GB Seagate External Drive - Disk Insertion error
I have two 750 GB Seagate External hard drives, which are daisy chained to my PowerMac G5. I was transfering files between external hard drives, when all of a sudden the computer crashed. Once I restarted, the computer gave a disk insertion error:
Disk Insertion
The disk you inserted was not readable by this computer.
The options are: "Initialize..." "Ignore" and "Eject"
One of the external hard drives is fine, the one which was directly hooked up to the computer. However, the drive that was daisy chained still gives this error. I have tried connecting the drive to another mac, but it still gave this error. I also tried connecting it to a PC, and it was detected, but it did not show up under "My Computer."
Is there a way that I could save or re-format the hard drive WITHOUT loosing the data?
Please let me know. This is very urgent. I have a lot of important data on the hard drive. Any help/ideas/suggestions are greatly appreciated. Thank you very much.Hello! Sometimes a large file transfer will lock or crash a computer. With a crash or hard restart the disk's directory is damaged and if disk utility can't repair it then DISKWARRIOR is about the only utility that can fix the problem. The data usually isn't gone. The disk's directory (road map) of where every piece of info is located on the drive has become corrupt hence there's nothing for it to find. Diskwarrior is the best utility for repairing the directory. Regular use of DW will prevent "most" disk problems as it's the directory that gets messed up rather than a physical problem with the disk in most cases. In cases where DW can't fix the problem DataRescue II can sometimes recover valuable data. Tom
-
SQL server Timeout issue in data insertion
We are loading data from DB2 database to SQL server using Data flow task. During data insertion in SQL server, we are receiving the below error.
"An exception has occurred during data insertion, the message returned from the provider is: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
Kindly help to resolve this issue.
Thanks!!!Check the connection timeout property of the source connection.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/a5571966-b14e-45c6-9ce8-4f5651d3ee00/ado-net-destination-timeout-issue?forum=sqlintegrationservices
Regards, RSingh -
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... -
Date format error in LOV with dates. Jdeveloper 11.1.1.0.1
We're facing a silly problem, which no one else seems to have... ?
When creating a LOV on a date column (eg hr.employees.hiredate) populated from another DataSource (eg. hr.job_history.startDate), the Application Module is working fine when tested.
Building a jspx on top of the Datacontrol picks up the LOV defined and creates a SelectOneChoice for hiredate. But for what ever value you select, it will complain about wrong date format "Error: The date is not in the correct format".
I can see, that the "real" value selected from the SelectOneChoice is an index-value, and the "format checking code" builtin to Jdeveloper can't figure out how to get the datevalue for the selected index.
Surely it must be me, who can't see the forest for the trees?
Thanks in advance :)Its a bit tricky - but its doable... We have to abandon the "Oracle LOV model" to make it work.
Surely its must be some kind of bug in the Oracle LOV model? ?
The way to do it is like:
In Model project:
M1: Remove List Of Value binding from Model layer (Business components). Both entity and view if declared both.
M2: Create a view for the "date list" - ie the datasource for possible values in list.
M3: Secure that format mask (hint) for all dates involved are the same.
In View project:
V1: Drop datacontrol on jspx as normal input dates.
V2:Go to bindings for the page, and add (+) a new TABLE binding (And from here an iterator) to the view containing the list.
Modify the input dates you want to be list:
V3: Select the input date and rightclick and choose "convert"
V4: Select a SelectOneChoice component
V5: Pick the right column (tree) value to show in the SelectOneChoice componet.
Switch to source view:
V6: Drop a ForEach item from the component Palette (ADF Faces -> operations) on the SelectOneChoice (easiest to drop in structure windows)
V7: Drop a Select Item from the component Palette (ADF Faces -> common components) on the SelectOneChoice (easiest to drop in structure window).
Modify the source:
V8: Insert "items" and "var" attributes in ForEach like this: +"items="#{bindings.[[Here goes the name of the New TableBinding component you made in Step V2]].rangeSet}" var="li"+
V9: Insert "value" attribute and change "label" attribute to reference your new list variable "li" like this: +label="#{li.[[here goes the name of the new TableBinding Component attribute (columnname) you made in Step V2]]}" value="#{li.Firstofmonth}"+
V10: Insert/edit any converters/validators needed for input validation.
Done....
You should end up with a SelectOnChoice definition (in your jspx file) something like this one:
+<af:selectOneChoice value="#{row.bindings.ActiveFrom.inputValue}"+
+label="#{row.bindings.ActiveFrom.label}"+
+required="#{bindings.McAccountsView1.hints.ActiveFrom.mandatory}"+
+shortDesc="#{bindings.McAccountsView1.hints.ActiveFrom.tooltip}">+
+<af:forEach items="#{bindings.FirstOfMonth1.rangeSet}" var="li">+
+<af:selectItem label="#{li.Firstofmonth}" value="#{li.Firstofmonth}" />+
+</af:forEach>+
+<af:convertDateTime pattern="dd-MM-yyyy"+
+messageDetailConvertDate="Its not possible to convert the date in {0} since its value {1} dont conform to the pattern {2}"+
+secondaryPattern="yyyy-MM-dd"/>+
+</af:selectOneChoice>+
And a binding definition (in your pagedef file) something like this one:
+<?xml version="1.0" encoding="UTF-8" ?>+
+<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"+
+version="11.1.1.52.5" id="McAccounts01PageDef"+
+Package="solution">+
+<parameters/>+
+<executables>+
+<iterator Binds="McAccountsView1" RangeSize="25"+
+DataControl="dateLovEmailDataControl"+
+id="McAccountsView1Iterator" ChangeEventPolicy="ppr"/>+
+<searchRegion Binds="McAccountsView1Iterator" Criteria=""+
+Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"+
+id="McAccountsView1Query"/>+
+<iterator id="FirstOfMonth1Iterator" RangeSize="10" Binds="FirstOfMonth1"+
+DataControl="dateLovEmailDataControl"/>+
+</executables>+
+<bindings>+
+<tree IterBinding="McAccountsView1Iterator" id="McAccountsView1">+
+<nodeDefinition DefName="dk.hammerJakobsen.Jdev.sample.model.McAccountsView">+
+<AttrNames>+
+<Item Value="EmployeeName"/>+
+<Item Value="Id"/>+
+<Item Value="BankAccount"/>+
+<Item Value="StellarAccount"/>+
+<Item Value="ActiveFrom"/>+
+<Item Value="ActiveTo"/>+
+</AttrNames>+
+</nodeDefinition>+
+</tree>+
+<action IterBinding="McAccountsView1Iterator" id="CreateInsert"+
+RequiresUpdateModel="true" Action="createInsertRow"/>+
+<action IterBinding="McAccountsView1Iterator" id="Delete"+
+RequiresUpdateModel="false" Action="removeCurrentRow"/>+
+<action IterBinding="McAccountsView1Iterator" id="First"+
+RequiresUpdateModel="true" Action="first"/>+
+<action IterBinding="McAccountsView1Iterator" id="Last"+
+RequiresUpdateModel="true" Action="last"/>+
+<action IterBinding="McAccountsView1Iterator" id="Find"+
+RequiresUpdateModel="true" Action="iteratorFind"/>+
+<action IterBinding="McAccountsView1Iterator" id="Execute"+
+RequiresUpdateModel="true" Action="iteratorExecute"/>+
+<action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"+
+DataControl="dateLovEmailDataControl"/>+
+<action id="Rollback" RequiresUpdateModel="false"+
+Action="rollbackTransaction" DataControl="dateLovEmailDataControl"/>+
+<table IterBinding="FirstOfMonth1Iterator" id="FirstOfMonth1">+
+<AttrNames>+
+<Item Value="Firstofmonth"/>+
+</AttrNames>+
+</table>+
+</bindings>+
+</pageDefinition>+
this approach works... But... Its important to remember that the "two" values are different now. The value in the row, and the possible value from the list. When you select a new value for the row from the list, you'll have to commit the value before its in the row - even seen from Faces. You can't reference the value in the base table in a validator before the row is committed.
For the same reason I'll advise, that you only use the model in Single row view, since its can behave a bit funny in table views, where there's a lot of PPR. -
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 -
Exception has occurred during data insertion ... Wrong number of parameters
I am using an ADO dataflow source and an ADO dataflow destination to move data from a table on an IBM iSeries DB2 database to another IBM iSeries DB2 database on another machine. The connection managers for source and destination both use .Net Providers\Odbc
Data Provider with the Data Source Specification being ODBC connections specified on the Windows Server 2008 r2 machine hosting bids. All the test connections work...so far so good.
Issue is when I execute the control flow task the rows get picked up from the source DB2 database no problem but it fails on the insert to the destination DB2 table...The progress tab specifies the exceptions...
[ADO NET Destination [601]] Error: An exception has occurred during data insertion, the message returned from the provider is: ERROR [07002] [IBM][System i Access ODBC Driver]Wrong number of parameters.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "ADO NET Destination" (601) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (604). The identified
component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the
failure.
I put a data viewer on the data flow connection and the records I expect are getting picked up and look ok. I checked to make sure the source and destination tables have the same number of columns in their record layout and identical data
types and they look fine.
Could someone kindly tell me whats going wrong? Does the error message indicate that some of the columns are getting dropped from the dataset before the insert?
Thanks much in advance for any help, RoscoeHi Roscoe,
Glad to hear that you have found the root cause. So, the issue occurs because numeric values with no decimal cannot be inserted into the Decimal data type column in the DB2 table. In SSIS, data type Decimal of DB2 database is mapped to data type DT_NUMERIC.
To address the issue, you can do a data conversion for the column in question to define its precision and scale such as DT_NUMERIC(9,2) by using the Data Conversion Transformation before the ADO NET Destination.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
Handle Date conversion error without function
Hi,
Database version 12.1 - though I would also like to hear if the solution is possible for 9i DB too, as I am pulling data from a view over a DB Link, and would prefer to have the date fix within the view to having to recreate the view logic in my datawarehouse.
A small illustrative sample of what I want.
Sample Data
create table descriptors (attribute1 varchar2(25), creation_date date);
insert into table descriptors (attribute1, creation_date) values ('010612',sysdate);
insert into table descriptors (attribute1, creation_date) values ('310612',sysdate);
commit;And the result I am after, in pseudo code....
select case when to_date(attribute1,'DDMMYY') = error then creation_date else to_date(attribute1,'DDMMYY') end as safe_date from descriptorsYes - I know this will not work!!
And yes, I know storing dates as text is not best practise, this is drill down data from Oracle e-business feeder files, decisions that were made before I had any influence over them - so I am having to make the best of a bad job.
thanks for your input,
Robert.Etbin wrote:
select case when case when to_number(substr(attribute1,3,2)) not between 1 and 12
then 'error'
when to_number(substr(attribute1,1,2)) not between 1 and to_number(to_char(last_day(to_date(substr(attribute1,3),'mmrr')),'dd'))
Neat solution !
I'll remember that.
But I fail to understand why the 2 embedded case ?
Should this be enough ?with
descriptors(attribute1,creation_date) as
(select '010612',trunc(sysdate) from dual union all
select '110612',trunc(sysdate) from dual union all
select '210612',trunc(sysdate) from dual union all
select '310612',trunc(sysdate) from dual
select case when to_number(substr(attribute1,3,2)) not between 1 and 12
then creation_date
when to_number(substr(attribute1,1,2)) not between 1 and to_number(to_char(last_day(to_date(substr(attribute1,3),'mmrr')),'dd'))
then creation_date
else to_date(attribute1,'ddmmrr')
end checked
from descriptors
/
Maybe you are looking for
-
Saving Animated .GIF Incorrectly?
Please help! I am trying to save an animated .gif with images that will rotate through every 1 second. Here is what I am doing...what am I doing wrong???!!!! Step 1: I create two frames Step 2: I add one image to each frame Step 3: I change the frame
-
Public Change Management indicator and mid-year reassignment in new GL
Dear experts, I have two questions on documentation at help.sap.com here http://help.sap.com/saphelp_erp60_sp/helpdata/en/b3/fa3a95ecd9465c82957992e30e1ff2/frameset.htm it is said that: 1. "You can use the SAP document change interface to reassign or
-
How to generate specific # of items in tabular form from one item
Looking to display or render additional elements to a tabular form based on the number entered in a quantity field. ie. if someone orders 10 items, I would like to have 10 tabular items display on blur, so the operator can enter the data in those fie
-
DW CS5 Unable to connect to a DB
I am using Apache 2.2, PHP 5.3, MySQL 5, and PHPMyAdmin. PHP works in Dreamweaver. MySQL works at the command prompt. I can see my database in PHPMyAdmin. My site is configured correctly. When I open the DATABASES MySQL connection tap in DWCS5 and e
-
DSR-11 not working properly when updated to OS 10.4 & FCP 6
IS the DSR-11 compatible with OS 10.4 & FCP 6? when i opened fcp after updating the OS and FCP, it said it cannot recognise the firewire device. i clicked ignore and opened log & capture and it says "tvr ok" but i get no video... any thoughts?