Insert using APPEND and NOLOGGING
Hi
I want to know that if we use INSERT with hint APPEND and NOLOGGING, then is the data written to rollback segment.
Please tell me how can we avoid writing to rollback segment as i am having a lot of data to insert and want to do it using select insert and not by using bulk insert.
Thanks,
Manish
Message was edited by:
user532526
is there any way that if some error occurs then the data should be rollled back If an exception occurs during the insert, the work will be rolled back automatically.
as with 20 lakh records the rollback segment will overflow.Are you sure? Have you tried it?
Similar Messages
-
Insertion using objects and update using queries in a single unit of work
HI All,
I have a set of objects that i want to insert and then perform some update queries ( direct queries ) on the inserted data in the same transaction. but when i register the objects and execute the update SQL's on the same data in a same unit of work, the update statements are executed first and then the inserts are happening, I've also tried with child unit of work and parent unit of work but the result is the same.
Can any one suggest a way to do object insertion and sql updates in a single transaction, Thanks in advance
Regards,
Sai KrishnaThe UnitOfWork is an abstraction for the physical database query. By default nothing is actually written into the database until the UnitOfWork commits. This means making updates to new objects involves modifying them in-memory and then the updated values will be included in the INSERT during commit.
If you are having difficulty finding the newly created objects you can enable the query conforming capabilities to have modified and new objects included in query comparisons without requiring them to first be written to the database.
Doug -
How feed many record in table component and not use append command again
hi master
How I feed Multiple records in table component and not use append and save command again and again
Same as oracle grid
I give many record and save one time
Please give me idea how I add Multiple record and save one time not use append and save command again and again
Thank�s
aamirHi!
appendRow() method just add temporal row. For add them to DB commitChanges() method should be used. So you can use appendRow() method several times, fill every new row and only then use commitChanges() method. In this case all new rows will be added to DB per one time.
Thanks,
Roman. -
Using append in gui download with file_type = 'DBF'
Hi gurus,
I wanna download data from three internal tables into the same excel sheet, i am using append and am also using FILE_TYPE = 'DBF'.
For this i am using 2 gui_downloads.
The problem is that my data is getting overwrite in the Excel file.
but when i am using FILE_TYPE = 'DAT' , the data is not getting overwrite.
Now my condition is that i HAVE to use DBF and i also want to append the data into the excel file.
How do i achieve the same using DBF and append.
Please help.Hello Dilip,
I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
1. Why do you need 'DBF' format?
2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
Plz revert back.
BR,
Suhas -
Insert /*+ Append */ and direct-path INSERT
Hi Guys
Does insert /*+ Append */ into hint cause Oracle 10G to use direct-path INSERT?
and if insert /*+ Append */ into hint does cause Oracle to use direct-path INSERT, does insert /*+ Append */ is subject to the same restrictions as direct-path such as "The target table cannot have any triggers or referential integrity constraints defined on it."
ThanksDear,
Here below a simple example showing the effet of existing trigger on the append hint
mhouri@mhouri> select * from v$version where rownum=1;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
mhouri@mhouri> create table b as select * from all_objects where 1 = 2;
Table créée.
mhouri@mhouri> insert /*+ append */ into b
2 select * from all_objects;
70986 ligne(s) créée(s).
mhouri@mhouri> select * from b;
select * from b
ERREUR à la ligne 1 :
ORA-12838: impossible de lire/modifier un objet après modification en parallèle
mhouri@mhouri> rollback;
Annulation (rollback) effectuée.The direct path took place as far as I can't select from the table before I commit
mhouri@mhouri> create trigger b_trg before insert on b
2 for each row
3 begin
4 null;
5 end;
6 /
Déclencheur créé.
mhouri@mhouri> insert /*+ append */ into b
2 select * from all_objects;
70987 ligne(s) créée(s).
424 ligne(s) sélectionnée(s).
mhouri@mhouri> select count(1) from b;
COUNT(1)
70987 While in the presence of this trigger on the table, the append hint has been silently ignored by Oracle. The fact that I can select from the table immediately afte the insert has finished is the indication that the table has not be inserted using direct path load
Best Regards
Mohamed Houri -
I am new to using Oracle, and I am trying to create an add/insert stored pr
I am new to using Oracle, and I am trying to create an add/insert stored procedure for a table. The PROD_CD and PLAN_CD fields in my table can have no value (empty or null) Can you please check my code and let me know what I am doing wrong?
Table definition:
CREATE TABLE DCWEB.USER_PLAN_PREFERENCE
USERID VARCHAR2(40) NOT NULL,
PROD_CD VARCHAR2(9) NULL,
PLAN_CD VARCHAR2(9) NULL,
STATE_LST VARCHAR2(2) NOT NULL,
STATE_NM VARCHAR2(40) NOT NULL,
LST_UPDATE_TS TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP NOT NULL
ALTER TABLE DCWEB.USER_PLAN_PREFERENCE
ADD CONSTRAINT USER_PLAN_PREFERENCE_XPK PRIMARY KEY (USERID, PROD_CD, PLAN_CD);
-- Grant/Revoke object privileges
grant select, insert, update, delete on DCWEB.USER_PLAN_PREFERENCE to HIGGIB1;
Stored Procedure Definition:
procedure setUserPlanPref (
userid in varchar2,
prod_cd in varchar2,
plan_cd in varchar2,
state_lst in varchar2,
state_nm in varchar2
is
currentTimestamp timestamp := current_timestamp;
begin
insert into user_plan_preference (userid, prod_cd, plan_cd, state_lst, state_nm, lst_update_ts)
values (upper(userid), upper(prod_cd), upper(plan_cd), upper(state_lst), upper(state_nm), currentTimestamp);
commit;
exception
when dup_val_on_index then
begin
update user_plan_preference up set
up.userid = upper(userid),
up.prod_cd = upper(prod_cd),
up.plan_cd = upper(plan_cd),
up.state_lst = upper(state_lst),
up.state_nm = upper(state_nm),
up.lst_update_ts = currentTimestamp
where up.userid = upper(userid)
and up.prod_cd = upper(prod_cd)
and up.plan_cd = upper(plan_cd);
commit;
exception
when others then
rollback;
end;
when others then
rollback;
end;
end;
INPUT DATA
I am unable to insert a record calling the stored procedure with values: DCWEB4578, , 2P, CA, CALIFORNIA but when I change to the string "NULL", the insert succeeds. When I try to call the stored procedure to update the inserted record with values: DCWEB4578, "NULL", 2P, CO, COLORODO the update does not happen since I still see the original record in the table. Please advise. Thanks in advance for your help.938319 wrote:
I am new to using OracleWelcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and ensure you've updated your profile with a real handle instead of "938319".
You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s)
With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
Thanks for posting the complete code, it makes it so much easier to understand the problem, but always post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.
and I am trying to create an add/insert stored procedure for a table.Does this have anything to do with APEX, for which this is the forum? General SQL & PL/SQL matters should be directed to the {forum:id=75} forum.
The PROD_CD and PLAN_CD fields in my table can have no value (empty or null) Can you please check my code and let me know what I am doing wrong?This:
commit;
exception
when others then
rollback;
end;
when others then
rollback;Remove it all.
Commits should be issued by end user/client software on completion of a transaction. This means <tt>commit;</tt> should almost never appear in PL/SQL code. The main exception to this is in <tt>dbms_job/secheduler</tt> scheduled processes that have no client or UI. If this code is executed from APEX, then APEX issues more than enough commits anyway.
exceptions are just a way of ensuring your code is buggy.<tt>when others</tt> exceptions are just a way of ensuring your code is buggy.
INPUT DATA
I am unable to insert a record calling the stored procedure with values: DCWEB4578, , 2P, CA, CALIFORNIA but when I change to the string "NULL", the insert succeeds. When I try to call the stored procedure to update the inserted record with values: DCWEB4578, "NULL", 2P, CO, COLORODO the update does not happen since I still see the original record in the table. Please advise. Thanks in advance for your help.With the <tt>commit</tt>s and <tt>when others...</tt> removed from the code you'll have a chance of seeing what's actually happening. Note that the entire procedure can be simplified by writing as a MERGE</tt> statement. -
Problem in Creating new row & inserting data using CreateInsert and Commit
Hello All,
I have created a page there are few input text and i want to insert the data into a database table. I have created an Application Module I am using CreateInsert and Commit operation but there is one problem.
At first it created a row in database after that it is not creating the new row instead it is updating the same row with the new values.
In bindings of my jspx page I have created two binding for action (1) CreateInsert for the VO of that Application Module (2) Commit operation of that Application Module.
Here is the code snippet of my application:
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
*if (!operationBinding.getErrors().isEmpty()) {*
return null;
OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
Object result1 = operationBinding1.execute();
*if (!operationBinding1.getErrors().isEmpty()) {*
return null;
I have tried using Execute+Commit and Insert+Commit case also in every case it is updating the same row and not inserting a new row.
Is there anything I am missing?
Please Help.hi user,
i dono. why are trying with codes. adf provides zero lines codes.
a wonderful drag and drop functionality provide by the framework.
while double click the button the codes are registered in your bean
public String cb6_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb8_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb7_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Delete");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb14_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("Delete4"); // some different here. after deleting usually do commit
OperationBinding operationBinding1 =
bindings.getOperationBinding("Commit"); // so here commit operation.
Object result = operationBinding.execute();
Object result1 = operationBinding1.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
if (!operationBinding1.getErrors().isEmpty()) {
//add error handling here
return null;
return null;
}if am not understud correctly. please some more explanation need. -
I used to buy used iphone and I'm in Mexico. I wanted to upgrade but I ask you insert a sim Mexican rejects me says that is not compatible or if I can never use my iphone here in mexico
reneagustin wrote:
is possible to make the phone legal?
More than likely not... Try google... -
How to update and insert the records without using Table_comparison and Map_operation?
Use either join or MERGE see this Inserting, Updating, and Deleting Data by Using MERGE
-
When I use the export function of quicklime (export to iPad,iPhone, Apple TV ... format), nothing append and I have the following error message on the monitor windows, (I'm using quicktime Version 10.4 (833) with OS X Yosemite ):
06/11/2014 22:22:03,507
QuickTime Player[1723]
postExceptionEvent caught non-fatal NSInvalidArgumentException '*** -[NSDictionary initWithObjects:forKeys:]: count of objects (0) differs from count of keys (4)' with backtrace (
0 CoreFoundation 0x00007fff8ac6564c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8924f6de objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ab98dcd -[NSDictionary initWithObjects:forKeys:] + 941
3 Foundation 0x00007fff8a6a8bcc -[NSDictionary(NSDictionary) initWithCoder:] + 245
4 Foundation 0x00007fff8a686150 _decodeObjectBinary + 2872
5 Foundation 0x00007fff8a6854a6 _decodeObject + 278
6 Foundation 0x00007fff8a6a9921 -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 173
7 Foundation 0x00007fff8a75f2b4 -[NSError initWithCoder:] + 253
8 Foundation 0x00007fff8a686150 _decodeObjectBinary + 2872
9 Foundation 0x00007fff8a6854a6 _decodeObject + 278
10 Foundation 0x00007fff8a6ab0c9 +[NSKeyedUnarchiver unarchiveObjectWithData:] + 89
11 QuickTime Player 0x000000010dcd8253 QuickTime Player + 758355
12 QuickTime Player 0x000000010dc8981f QuickTime Player + 436255
13 QuickTime Player 0x000000010dc894fb QuickTime Player + 435451
14 QuickTime Player 0x000000010dc6ce48 QuickTime Player + 319048
15 AppKit 0x00007fff93c5d75a __85-[NSDocument runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:]_block_ invoke1714 + 113
16 AppKit 0x00007fff93c4efca -[NSDocument continueActivityUsingBlock:] + 323
17 AppKit 0x00007fff93c5d5cb __85-[NSDocument runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:]_block_ invoke_21706 + 458
18 AppKit 0x00007fff93c5d0ec __85-[NSDocument runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:]_block_ invoke1690 + 1365
19 AppKit 0x00007fff940903b6 -[NSVBSavePanel didEndPanelWithReturnCode:] + 68
20 AppKit 0x00007fff9409323d -[NSVBSavePanel didEndSheet:returnCode:contextInfo:] + 154
21 AppKit 0x00007fff93f718d9 -[NSWindow _endWindowBlockingModalSession:returnCode:] + 315
22 AppKit 0x00007fff9409307c -[NSVBSavePanel observeValueForKeyPath:ofObject:change:context:] + 560
23 Foundation 0x00007fff8a677c73 NSKeyValueNotifyObserver + 382
24 Foundation 0x00007fff8a676e48 NSKeyValueDidChange + 463
25 Foundation 0x00007fff8a67b9ad -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
26 ViewBridge 0x00007fff959cbbd7 -[NSViewBridge nonLocalChangeInProgress:block:] + 382
27 ViewBridge 0x00007fff95a15766 -[NSRemoteViewMarshal exceptionSafeSetRemoteObject:forKey:withReply:] + 275
28 ViewBridge 0x00007fff95a158f1 -[NSRemoteViewMarshal setRemoteObject:forKey:withReply:] + 56
29 CoreFoundation 0x00007fff8ab3e33c __invoking___ + 140
30 CoreFoundation 0x00007fff8ab3e192 -[NSInvocation invoke] + 290
31 ViewBridge 0x00007fff95a1bce3 __deferNSXPCInvocationOntoMainThread_block_invoke + 85
32 ViewBridge 0x00007fff95a1b91e __deferBlockOntoMainThread_block_invoke_2 + 390
33 CoreFoundation 0x00007fff8ab8354c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
34 CoreFoundation 0x00007fff8ab75655 __CFRunLoopDoBlocks + 341
35 CoreFoundation 0x00007fff8ab75196 __CFRunLoopRun + 1814
36 CoreFoundation 0x00007fff8ab74838 CFRunLoopRunSpecific + 296
37 HIToolbox 0x00007fff8cb6f43f RunCurrentEventLoopInMode + 235
38 HIToolbox 0x00007fff8cb6f1ba ReceiveNextEventCommon + 431
39 HIToolbox 0x00007fff8cb6effb _BlockUntilNextEventMatchingListInModeWithFilter + 71
40 AppKit 0x00007fff9383b821 _DPSNextEvent + 964
41 AppKit 0x00007fff9383afd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
42 AppKit 0x00007fff9382ef73 -[NSApplication run] + 594
43 AppKit 0x00007fff9381a424 NSApplicationMain + 1832
44 libdyld.dylib 0x00007fff8ec845c9 start + 1
timestamp: 22:22:03.507 Thursday 06 November 2014
process/thread/queue: QuickTime Player (1723) / 0x7fff78cd0300 / com.apple.main-thread
code: line 844 of /SourceCache/ViewBridge/ViewBridge-99/ViewBridgeUtilities.m in logCaughtException
#exceptions
06/11/2014 22:22:03,525
com.apple.appkit.xpc.openAndSavePanelService[1748]
remote view failed to set bridge object {
URL = "file:///Users/pascalgros/Documents/Videos%20Maurice%202013/Exports/M2U01020.m4 v";
URLs = (
"file:///Users/pascalgros/Documents/Videos%20Maurice%202013/Exports/M2U01020.m4 v"
index = 1;
result = 1;
} for key most-recent-completion due to Error Domain=com.apple.ViewBridge Code=8 "L’opération n’a pas pu s’achever. (com.apple.ViewBridge erreur 8)." UserInfo=0x61000006ebc0 {com.apple.ViewBridge.error.hint=most-recent-completion, com.apple.ViewBridge.error.description=NSViewBridgeExceptionError}; service call stack was (
0 ViewBridge 0x00007fff959e8b30 -[NSViewServiceMarshal setRemoteObject:forKey:] + 341
1 Foundation 0x00007fff8a677c73 NSKeyValueNotifyObserver + 382
2 Foundation 0x00007fff8a676e48 NSKeyValueDidChange + 463
3 Foundation 0x00007fff8a67b9ad -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
4 com.apple.appkit.xpc.openAndSavePanelService 0x000000010a661407 com.apple.appkit.xpc.openAndSavePanelService + 9223
5 AppKit 0x00007fff93dead5a -[NSSavePanel _dismissModeless:] + 109
6 com.apple.appkit.xpc.openAndSavePanelService 0x000000010a66191c com.apple.appkit.xpc.openAndSavePanelService + 10524
7 AppKit 0x00007fff93ded580 -[NSSavePanel ok:] + 449
8 com.apple.appkit.xpc.openAndSavePanelService 0x000000010a661952 com.apple.appkit.xpc.openAndSavePanelService + 10578
9 libsystem_trace.dylib 0x00007fff8d3ebcd7 _os_activity_initiate + 75
10 AppKit 0x00007fff93a0a5e7 -[NSApplication sendAction:to:from:] + 410
11 AppKit 0x00007fff93a0a410 -[NSControl sendAction:to:] + 86
12 AppKit 0x00007fff93bdedaf __26-[NSCell _sendActionFrom:]_block_invoke + 131
13 libsystem_trace.dylib 0x00007fff8d3ebcd7 _os_activity_initiate + 75
14 AppKit 0x00007fff93a52f2c -[NSCell _sendActionFrom:] + 144
15 AppKit 0x00007fff93bc5ab2 -[NSButtonCell _sendActionFrom:] + 39
16 libsystem_trace.dylib 0x00007fff8d3ebcd7 _os_activity_initiate + 75
17 AppKit 0x00007fff93a6da66 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2731
18 AppKit 0x00007fff93a6ccc1 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 491
19 AppKit 0x00007fff93a6c289 -[NSControl mouseDown:] + 714
20 AppKit 0x00007fff93f65fef -[NSWindow _reallySendEvent:] + 12827
21 AppKit 0x00007fff939f065c -[NSWindow sendEvent:] + 368
22 AppKit 0x00007fff939a21e6 -[NSApplication sendEvent:] + 2238
23 ViewBridge 0x00007fff959d18ab -[NSViewServiceApplication sendEventWithoutCatch:withForwarding:] + 652
24 ViewBridge 0x00007fff959d1fbd -[NSViewServiceApplication sendEvent:withForwarding:] + 29
25 AppKit 0x00007fff9382efe8 -[NSApplication run] + 711
26 AppKit 0x00007fff9381a424 NSApplicationMain + 1832
27 libxpc.dylib 0x00007fff88837ef2 _xpc_objc_main + 793
28 libxpc.dylib 0x00007fff88839a9d _parse_sysctl_once + 0
29 ViewBridge 0x00007fff95a20165 xpc_connection_handler + 0
30 ViewBridge 0x00007fff959d4ff7 NSViewServiceApplicationMain + 1892
31 com.apple.appkit.xpc.openAndSavePanelService 0x000000010a665035 main + 208
32 libdyld.dylib 0x00007fff8ec845c9 start + 1
33 ??? 0x0000000000000001 0x0 + 1
timestamp: 22:22:03.525 Thursday 06 November 2014
process/thread/queue: com.apple.appkit.xpc.openAndSavePanelService (1748) / 0x7fff78cd0300 / com.apple.main-thread
code: line 3847 of /SourceCache/ViewBridge/ViewBridge-99/NSViewServiceMarshal.m in __47-[NSViewServiceMarshal setRemoteObject:forKey:]_block_invoke_2
#communications_failureHi,
have you tried to connect on the command line (instead of using R3trans) ?
db2 connect to AE1 user sapae1 using .....
If this works and you have verified that the DB2DB6EKEY is set properly, use dscdb6up to update the password in the password file dscbd6.conf.
Then try again to use R3trans to connect.
Best regards,
Jens -
Should we use LOGGING or NOLOGGING for table, lob segment, and indexes?
We have some DML performance issue on cf contention over the tables that also include LOB segments. In this case, should we define LOGGING on tables, lob segments, and/or INDEXES?
Based on the metalink note < Performance Degradation as a Result of 'enq: CF - contention' [ID 1072417.1]> It looks we need to turn on logging for at least table and lob segment. What about the indexes?
Thanks!>
These tables that have nologging are likely from the application team. Yes, we need to turn on the logging from nologging for tables and lob segments. What about the indexes?
>
Indexes only get modified when the underlying table is modified. When you need recovery you don't want to do things that can interfere with Oracle's ability to perform its normal recovery. For indexes there will never be loss of data that can't be recovered by rebuilding the index.
But use of NOLOGGING means that NO RECOVERY is possible. For production objects you should ALWAYS use LOGGING. And even for those use cases where use of NOLOGGING is appropriate for a table (loading a large amount of data into a staging table) the indexes are typically dropped (or at least disabled) before the load and then rebuilt afterward. When they are rebuilt NOLOGGING is used during the rebuild. Normal index operations will be logged anyway so for these 'offline' staging tables the setting for the indexes doesn't really matter. Still, as a rule of thumb you only use NOLOGGING during the specific load (for a table) or rebuild (for an index) and then you would ALTER the setting to LOGGING again.
This is from Tom Kyte in his AskTom blog from over 10 years ago and it still applies today.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5280714813869
>
NO NO NO -- it does not make sense to leave objects in NOLOGGING mode in a production
instance!!!! it should be used CAREFULLY, and only in close coordination with the guys
responsible for doing backups -- every non-logged operation performed makes media
recovery for that segment IMPOSSIBLE until you back it up.
>
Use of NOLOGGING is a special-case operation. It is mainly used in Datawarehouse (OLAP systems) data processing during truncate-and-load operations on staging tables. Those are background or even offline operations and the tables are NOT accessible by end users; they are work tables used to prepare the data that will be merged to the production tables.
1. TRUNCATE a table
2. load the table with data
3. process the data in the table
In those operations the table load is seldom backed up and rarely needs recovery. So use of NOLOGGING enhances the performance of the data load and the data can be recovered, if necessary, from the source it was loaded from to begin with.
Use of NOLOGGING is rarely, if ever, used for OLTP systems since that data needs to be recovered. -
XML insertion/updation using merge and generate sequence number
Hi,
I am working on Oracle 11g.
I have a doubt with XML load.
I get an xml and I have to insert or update data into a table A. This I can achieve using MERGE statement.
But there is one column in Table A, that I need to populate with a sequence number, based on the data sent in the xml.
The xml does not send this column data.
And I have to make sure the sequence is created based on the order in which records are present in xml.
For example the MERGE is inserting five rows and then updating next two rows and again inserting 3 rows from xml into table A. The sequence number should be created in the same order for the column in table A.
Also for each new xml, the sequence starts with 1 and ends with the number of records in the xml. So I cannot create a sequence and use seq.nextval.
Please let me know, there is a way of achieveing this.
Thank you!
Edited by: 934451 on Aug 8, 2012 6:33 AM
Edited by: 934451 on Aug 8, 2012 6:50 AMHi,
Following up on your previous thread : {thread:id=2403469}
You can use the FOR ORDINALITY clause in XMLTable to generate the required sequence :
MERGE INTO target_table t
USING (
SELECT x.seq_num, x.pk_id, x.col1, x.col2, ...
FROM XMLTable(
'/root/record'
passing my_xml_doc
columns seq_num FOR ORDINALITY
, pk_id number path 'ID'
, col1 varchar2(30) path 'COL1'
, col2 varchar2(30) path 'COL2'
) x
) src
ON ( t.pk_id = src.pk_id )
WHEN MATCHED THEN UPDATE
SET t.seq_num = src.seq_num
, t.col1 = src.col1
, t.col2 = src.col2
WHEN NOT MATCHED THEN INSERT
(seq_num, pk_id, col1, col2, ...)
VALUES (src.seq_num, src.pk_id, src.col1, src.col2, ...)
; -
Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear???? any help would be greatly appreciated.
You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this. If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum. -
I am trying to upgrade from Tiger to Snow Leopard. When I insert the disk and install starts, it states "This disk is used for Time Machine backups" and Mac OSX can't be installed. Does anyone know how to correct this (since Tiger doesn't have Time Machine)?
http://support.apple.com/kb/TS2986
-
ok i get this error when hooking my dvd drive up and tring to use my windows 7 cdNo Bootable device. Insert boot disk and press any key. i have tried to use command key i see the cd icon and hit that and i get the error
Wiley207 wrote:
Believe it or not, it was the FireWire drive that was the problem! I managed to successfully install Windows 7 using an external USB DVD drive!
Well I am truly staggered, I have tried this on two different MacBook Pros, with three different external USB optical drives. Don't know if you googled as I suggested but you would find hundreds of others who have found same thing. The exception is MacBook Air which works with the Apple writer, but I don't know much about this.
Were you doing any of the special workarounds with refedit etc?
What model USB DVD drive?
Maybe you are looking for
-
Error while creating control file
hi i am getting following error while creating controll file QL> shutdown Database closed. Database dismounted. ORACLE instance shut down. SQL> startup nomount ORACLE instance started. Total System Global Area 629145600 bytes Fixed Size
-
Help me to Create this Process Chain
Hi Gurus, We have 3 Process chains, 1) Region 1 2) Region 2 3) Region 3 These three process chains were start at differt times and end time will depends upon the load of data. Now i want to do some manual calculations after the successful execution o
-
Change posting date during UD Reversal
Hi All During working with a UD reversal program by using SAP note 175842 i came to know that the posting date only comes as the current date. If Today i am reversing the UD of a batch which is 15 days old (Example-15.02.2014) then the posting date
-
Passing expression values to a container operation
hello, I have a question about passing values to a expression in a container operation. we have a container operation that has a hard coded value for a expression value. we are using a result element of offset days and the expression value is 4. some
-
I get the following msg's. This happening more often, and when I back out to restart it may take a couple of times so that I do not get the error msg's? Exc in ev handl: TypeError: oSAPlg.oRoot.log is not a function Exc in ev handl: Error: Bad NPObje