Insert row wherever within a table?
Can it be done? Looking to add and delete rows wherever needed within a table. Currently, it only allows me to add or remove either the very first row or the very last; not those in-between. My users constantly request the ability to insert where needed (like word and excel) and I'm stumped on how to work it out.
1. Cell options
2. Cell options!
You probably have too much space inside the top and bottom edges of each cell. Select the entire table and select Cell Options (from the Table menu or from your friendly right click pop-up menu). A relatively safe value for Top and Bottom distance is 1 mm.
You can see the grid lines either because you have Show Frame Edges on (they should be thin and blue), or, more likely, because the ID import doesn't honor the Excel settings and puts the lines there by itself. If your lines are blue and thin, don't worry; they're just there to help you. Select Preview mode and they will disappear (just as text frame edges, guidelines, etc.). If the lines are black and thick, select the entire table and use the Cell options to switch them off. Just select either 0 pt thickness or a [None] line color.
Similar Messages
-
Compare 2 tables and insert rows missing in each table.
I have a tough situation. I have two exact tables- one online and one offline database. I know that there are missing rows of data from each table, so I need to make a comparison of one table and insert rows that do not exist. I was thinking to try this, but it took over 3 hours to run and did not return anything:
insert into t
select * from t a
where not exists (select * from [email protected] b
where a.col1 != b.col1
and a.col2 != b.col2
and a.col3 != b.col3);
and it goes on for another 7columns.
The trouble I have is to include a date clause so that the query can be broken down into running only a few months of data comparisions at a time- the records go back 4 years to compare. Also is there a way to write this so that it will query both tables at the same time in order to speed things up- or is one table at a time the best advice? Each table has over 100 million records to compare, that's why I was hoping to use a date criteria since one column is date.
Let me know what you advise to make this work, I hope I was on the right track.Not sure if the MINUS operator will perform better with your data set but;
SQL> create table t1 (some_id number, some_date date)
Table created.
SQL> create table t2 (some_id number, some_date date)
Table created.
SQL> insert into t1 values (1, trunc(sysdate))
1 row created.
SQL> insert into t1 values (2, trunc(sysdate-5))
1 row created.
SQL> insert into t1 values (4, trunc(sysdate-90))
1 row created.
SQL> insert into t2 values (1, trunc(sysdate))
1 row created.
SQL> insert into t2 values (3, trunc(sysdate-10))
1 row created.
SQL> insert into t2 values (5, trunc(sysdate-100))
1 row created.
SQL> select * from t1
SOME_ID SOME_DAT
1 07-07-30
2 07-07-25
4 07-05-01
3 rows selected.
SQL> select * from t2
SOME_ID SOME_DAT
1 07-07-30
3 07-07-20
5 07-04-21
3 rows selected.
SQL> insert into t1 (
select some_id, some_date from t2 where some_date between sysdate-50 and sysdate
minus
select some_id, some_date from t1 where some_date between sysdate-50 and sysdate)
1 row created.
SQL> insert into t2 (
select some_id, some_date from t1 where some_date between sysdate-50 and sysdate
minus
select some_id, some_date from t2 where some_date between sysdate-50 and sysdate)
1 row created.
SQL> select * from t1
SOME_ID SOME_DAT
1 07-07-30
2 07-07-25
4 07-05-01
3 07-07-20
4 rows selected.
SQL> select * from t2
SOME_ID SOME_DAT
1 07-07-30
3 07-07-20
5 07-04-21
2 07-07-25
4 rows selected. -
Programming insert row VO,but inner-table no data show?
We have Master-Detail-Detail ViewObject,when programming insert row three ViewObject,why inner-table UI no data show?
[Source Code ZIP files|http://docs.google.com/leaf?id=0B1l5uiKPTIr_ZTQwYTQ1MTMtZWFlMS00YWQ1LWFiZWQtYzNmODIwNDRlZWJk&hl=zh_TW]
1.SmpTest0PG.xml click button.
2.SmpTest0CO.java call MyTestAMImpl.java create Method insert row three ViewObject.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Test") != null)
String key = "1";
Serializable aserializable1[] = { key };
String quote_id = (String)am.invokeMethod("create", aserializable1);
if (!quote_id.equals(null))
pageContext.setForwardURL("OA.jsp?page=/smp/oracle/apps/pos/test/webui/SmpTestPG&Key="+key,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
3.SmpTest0CO.java Forward SmpTestPG.xml.
4.SmpTestPG.xml Show Data.
MyTestAMImpl.java
public String create(String key)
int vendor_id = 0;
String vendor_name = null;
int contact_id = 0;
int site_id = 0;
String quote_id = null;
OADBTransaction trx = (OADBTransaction)((OAApplicationModuleImpl)this).getDBTransaction();
SmpPoHdVOImpl hdvo = getSmpPoHdVO();
SmpPoDlVOImpl dlvo = getSmpPoDlVO();
SmpPoDkVOImpl shvo = getSmpPoDkVO();
if (!hdvo.isPreparedForExecution())
hdvo.setWhereClause("1 = 0");
hdvo.setMaxFetchSize(0);
hdvo.executeQuery();
if (!dlvo.isPreparedForExecution())
dlvo.setWhereClause("1 = 0");
dlvo.setMaxFetchSize(0);
dlvo.executeQuery();
if (!shvo.isPreparedForExecution())
shvo.setWhereClause("1 = 0");
shvo.setMaxFetchSize(0);
shvo.executeQuery();
String s = key;
Serializable aserializable[] = { s };
SmpViewPoHdVOImpl quhdvo = getSmpViewPoHdVO();
if(quhdvo != null)
quhdvo.invokeMethod("initQuery", aserializable);
SmpViewPoDlVOImpl qudlvo = getSmpViewPoDlVO();
// insert hd
quhdvo.setRangeSize(-1);
Row quhdrow[] = quhdvo.getAllRowsInRange();
for(int i = 0; quhdrow != null && i < quhdrow.length; i++)
Row hdrow = hdvo.createRow();
hdrow.setAttribute("DocNum","200");
hdvo.insertRow(hdrow);
hdrow.setNewRowState(Row.STATUS_NEW);
quote_id = hdrow.getAttribute("HEADER_ID").toString();
// insert dl
RowIterator dlIter = (RowIterator)quhdrow.getAttribute("SmpViewPoDlVO");
dlIter.setRangeSize(-1);
Row qudlrow[] = dlIter.getAllRowsInRange();
int line_seq = 0;
for(int j = 0; qudlrow != null && j < qudlrow.length; j++)
Row dlrow = dlvo.createRow();
line_seq ++;
dlrow.setAttribute("LineNum",String.valueOf(line_seq));
dlrow.setAttribute("ItemNo",qudlrow[j].getAttribute("ItemNo"));
dlrow.setAttribute("Qty",qudlrow[j].getAttribute("Qty"));
dlvo.insertRow(dlrow);
dlrow.setNewRowState(Row.STATUS_NEW);
// insert shipment
RowIterator shipIter = (RowIterator)qudlrow[j].getAttribute("SmpViewPoDkVO");
shipIter.setRangeSize(-1);
Row shipRow[] = shipIter.getAllRowsInRange();
int ship_seq = 0;
for(int k = 0; shipRow != null && k < shipRow.length; k++)
ship_seq ++;
Row shrow = shvo.createRow();
shrow.setAttribute("ShipmentNum",String.valueOf(ship_seq));
shrow.setAttribute("Qty",shipRow[k].getAttribute("Qty"));
shvo.insertRow(shrow);
shrow.setNewRowState(Row.STATUS_NEW);
return quote_id;
Edited by: Tony_Huang on Apr 10, 2010 3:59 PMpublic class SmpTestCO extends OAControllerImpl
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OATableBean oatablebean = (OATableBean)webBean.findChildRecursive("SmpPoDlVORN");
OATableBean oatablebean1 = (OATableBean)webBean.findChildRecursive("SmpPoDkVORN");
if (oatablebean != null)
oatablebean.setAttributeValue(UIConstants.ALL_DETAILS_ENABLED_ATTR, ((Object) (Boolean.TRUE)));
oatablebean.setAttributeValue(OAWebBeanConstants.VIEW_LINK_NAME, "SmpPoDlDkVL1");
if (oatablebean1 != null)
oatablebean1.setAttributeValue(OAWebBeanConstants.VIEW_LINK_NAME, "SmpPoDlDkVL1");
oatablebean1.setInsertable(true);
oatablebean1.setAutoInsertion(true);
} -
Inserting rows in PL/SQl table
Hi,
I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row in the table. Can I insert the row in the pl/sql table within the loop without affecting the 'FOR i IN tab.first..tab.last' loop ??
Also what would be the index of such a row inserted in the table. Can I access it with tab.last+1 (doesnt look like it can be done if i insert in the various levels of loops).
OR
If I insert the rows insde the nested loops , then I can access the new rows once I close all the loops and open a fresh loop ??. Will the new rows be at the last of the table.
Any help will be appreciated ...user2309906 wrote:
Hi,
I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row in the table. Can I insert the row in the pl/sql table within the loop without affecting the 'FOR i IN tab.first..tab.last' loop ??
Also what would be the index of such a row inserted in the table. Can I access it with tab.last+1 (doesnt look like it can be done if i insert in the various levels of loops).
OR
If I insert the rows insde the nested loops , then I can access the new rows once I close all the loops and open a fresh loop ??. Will the new rows be at the last of the table.
Any help will be appreciated ...With an associative array:
SQL> ed
Wrote file afiedt.buf
1 declare
2 type t_arr is table of varchar2(10) index by pls_integer;
3 v_arr t_arr;
4 v_cnt number := 0;
5 begin
6 -- populate the associative array
7 for i in (select ename from emp)
8 loop
9 v_cnt := v_cnt + 1;
10 dbms_output.put_line('Populating: '||i.ename);
11 v_arr(v_cnt) := i.ename;
12 end loop;
13 -- now process the associative array
14 for i in v_arr.first .. v_arr.last
15 loop
16 dbms_output.put_line('Processing: '||i||':'||v_arr(i));
17 if v_arr(i) IN ('KING','TURNER','JAMES') then
18 v_arr(v_arr.last+1) := v_arr(i)||to_char(i);
19 dbms_output.put_line('Added: '||v_arr.last||':'||v_arr(i));
20 end if;
21 end loop;
22 -- now what's in the associative array?
23 for i in v_arr.first .. v_arr.last
24 loop
25 dbms_output.put_line('Result: '||i||':'||v_arr(i));
26 end loop;
27* end;
SQL> /
Populating: SMITH
Populating: ALLEN
Populating: WARD
Populating: JONES
Populating: MARTIN
Populating: BLAKE
Populating: CLARK
Populating: SCOTT
Populating: KING
Populating: TURNER
Populating: ADAMS
Populating: JAMES
Populating: FORD
Populating: MILLER
Processing: 1:SMITH
Processing: 2:ALLEN
Processing: 3:WARD
Processing: 4:JONES
Processing: 5:MARTIN
Processing: 6:BLAKE
Processing: 7:CLARK
Processing: 8:SCOTT
Processing: 9:KING
Added: 15:KING
Processing: 10:TURNER
Added: 16:TURNER
Processing: 11:ADAMS
Processing: 12:JAMES
Added: 17:JAMES
Processing: 13:FORD
Processing: 14:MILLER
Processing: 15:KING9
Processing: 16:TURNER10
Processing: 17:JAMES12
Result: 1:SMITH
Result: 2:ALLEN
Result: 3:WARD
Result: 4:JONES
Result: 5:MARTIN
Result: 6:BLAKE
Result: 7:CLARK
Result: 8:SCOTT
Result: 9:KING
Result: 10:TURNER
Result: 11:ADAMS
Result: 12:JAMES
Result: 13:FORD
Result: 14:MILLER
Result: 15:KING9
Result: 16:TURNER10
Result: 17:JAMES12
PL/SQL procedure successfully completed.With standard array (PL/SQL table):
SQL> ed
Wrote file afiedt.buf
1 declare
2 type t_arr is table of varchar2(10);
3 v_arr t_arr;
4 v_cnt number := 0;
5 begin
6 -- populate the pl/sql table
7 select ename bulk collect into v_arr from emp;
8 -- now process the pl/sql table
9 for i in v_arr.first .. v_arr.last
10 loop
11 dbms_output.put_line('Processing: '||i||':'||v_arr(i));
12 if v_arr(i) = 'KING' then
13 v_arr.extend;
14 v_arr(v_arr.last) := 'PRESIDENT';
15 end if;
16 end loop;
17 -- now what's in the pl/sql table?
18 for i in v_arr.first .. v_arr.last
19 loop
20 dbms_output.put_line('Result: '||i||':'||v_arr(i));
21 end loop;
22* end;
SQL> /
Processing: 1:SMITH
Processing: 2:ALLEN
Processing: 3:WARD
Processing: 4:JONES
Processing: 5:MARTIN
Processing: 6:BLAKE
Processing: 7:CLARK
Processing: 8:SCOTT
Processing: 9:KING
Processing: 10:TURNER
Processing: 11:ADAMS
Processing: 12:JAMES
Processing: 13:FORD
Processing: 14:MILLER
Processing: 15:PRESIDENT
Result: 1:SMITH
Result: 2:ALLEN
Result: 3:WARD
Result: 4:JONES
Result: 5:MARTIN
Result: 6:BLAKE
Result: 7:CLARK
Result: 8:SCOTT
Result: 9:KING
Result: 10:TURNER
Result: 11:ADAMS
Result: 12:JAMES
Result: 13:FORD
Result: 14:MILLER
Result: 15:PRESIDENT
PL/SQL procedure successfully completed.
SQL>So, in answer to your questions...
Inserting additional rows in the array during the loop will effect the "last" value and alter the array. If you need to avoid this effect, store the "last" value in a variable and loop up to that value of the variable.
New rows will generally be additional rows on the end of the array unless you are using associative arrays which will then depend on how you reference the rows in the array. -
Inserting rows in a database table using JDBC
Hi,
I am trying to insert a row in a table using the follwing code:
String Query_String = "Insert into Table_Name (Field_1, Field_2, Field_3)" +
"Values (Value_1, Value_2, Value_3)";
stmt.executeUpdate (Query_String);
Field_1 is a Date field, Field_2 is a String, and Field_3 is an integer.
Any of the fields could be null. If the user does not enter a value for any
one of these fields what would be the values for
Value_1, Value_2, or Value3 in the Query_String?
Thanks.Hi,
I am trying to insert a row in a table using the
follwing code:
String Query_String = "Insert into Table_Name
(Field_1, Field_2, Field_3)" +
"Values (Value_1,
"Values (Value_1, Value_2, Value_3)";
stmt.executeUpdate (Query_String);
Field_1 is a Date field, Field_2 is a String, and
Field_3 is an integer.
Any of the fields could be null. If the user does not
enter a value for any
one of these fields what would be the values for
Value_1, Value_2, or Value3 in the Query_String?
Thanks.Keep in mind that each database server probably has their own way of storing date values. For now, I'm going to assume that you're going to be using MySQL.
// Initialize variables to null
String Value_1 = "";
String Value_2 = "";
String Value_3 = "";
try
// Get Date
Date date = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Value_1 = dateFormat.format(date);
// Get String value
Value_2 = "some string";
// Get Integer value
Value_3 = String.valueOf("2");
String query = INSERT INTO T_NAME VALUES('" + Value_1 +"', '" + Value_2 + "', '" + Value_3 + "');
int iUpdated = stmt.executeUpdate(query);
catch(Exception e)
// Catch Code
System.out.println("Number of records updated: " + iUpdated);
This will just enter empty string values if the strings are empty.
Is this what you wanted to know?
If not, provide a bit more information and I'll try to help as best as I can -
Inserting Rows in an Editable Table
Application Focus: JSF with ADF/BC.
watching Steve Muench´s Screencast on "Creating an Editable Table with a Dropdown List in Each Row" i was inspired to add a functionality to add rows.
Lets say i have an Employee and Departments table. If i want to add three new employees in the employee editable table - that wont work - it seems that adding rows aint that simple, cause it seems not possible to commit more than one row at a time
what i did according to forum posts and how-to´s:
1. dropped "insert" from data control palette
2. altered binding to from create to "CreateInsert"
works ok, but if i press the button twice (3x, 4x) the new rows are shown, but if i commit them, only one is in the database?
Any tips on that would be appreciated.I'm trying to a similar thing, create an input screen that allows you to add muliple rows at the same time some rows having a drop down list. I've read the following How to which lets me edit multiple rows but if I add a create button or a CreateInsert button it doesnt seem to give me rows to create.
How To Create Multi Row Edit Forms in a JSP Page with Oracle JDeveloper 10g
http://www.oracle.com/technology/products/jdev/tips/mills/JSP_Multi_Row_Edits.html -
Loop Cursor Fetch Insert Rows Into Global Temporay Table
Hi friends,
I want to know there where is the problem in my this query
cursor c1 is select empno
from scott.emp;
b number;
begin
open c1;
loop
fetch c1 into b;
exit when c1%notfound;
insert into scheema.a1
(a)
values
(b);
commit;
end loop;
close c1;
end;
There is no any error displaying while proceeding this query but the table a1 which is (Global temporary table with ON COMMIT PRESERVE ROWS option enabled) does not gets any records. Kindly let me know the problem.
Regards.Are you sure that the query returns date? Are you checking the table via the same session?
SQL> create global temporary table a1 (
a number)
on commit preserve rows
Table created.
SQL> declare
cursor c1 is select empno
from scott.emp;
b number;
begin
open c1;
loop
fetch c1 into b;
exit when c1%notfound;
insert into a1
(a)
values
(b);
commit;
end loop;
close c1;
end;
PL/SQL procedure successfully completed.
SQL> select * from a1
A
7369
7499
7521
7566
7654
7698
7782
7788
7839
7844
7876
7900
7902
7934
14 rows selected. -
Timeout when inserting row in a locked table
How can I set the timeout before an INSERT statement fails with error ORA-02049 (timeout: distributed transaction waiting for lock) when the entire table has been lock with LOCK TABLE .
Documentation says to modify DISTRIBUTED_LOCK_TIMEOUT parameter, but it is obsolete in Oracle 8i.
Any idea ???You could set an alarm() in a signal. Then on return (for whatever reason) you clear the alarm, inspect the return code of the sql execute call and determine what happened (i.e. did the transaction completed or did the alarm get you).
Hope it helps.
-Lou
[email protected]
How can I set the timeout before an INSERT statement fails with error ORA-02049 (timeout: distributed transaction waiting for lock) when the entire table has been lock with LOCK TABLE .
Documentation says to modify DISTRIBUTED_LOCK_TIMEOUT parameter, but it is obsolete in Oracle 8i.
Any idea ??? -
Idea
A useful feature I would like to suggest would be to allow the creation of multiple blank rows from the 'insert row' button in a table tab.
Possible Solution
A good solution would be to add a prompt next to the button in order to specify the number of blank rows you wish to create. It should default to one to keep the current behavior intact but would allow the user to specify how many rows to insert.
Issues with Current Behavior
Currently you need to click 'insert new row' 50 times to paste 50 rows (from excel for example). If you click it 30 times and paste 50 rows, it will insert the first 30, then overwrite the first 20 existing values. Plus clicking the insert button for each row you want to insert isn't that productive.
Other Comments
I'm sure that many have experienced this delemma and has issues with the consistency of the current excel import tool. This solution would prove to be an easy alternative to importing with a tool and will prove to be a simple way to really improve the usability and much more importantly the ease of this product.
Feedback
If you have had a situation where this would have been nifty feel free to reply with thoughts.
Oracle
Do you believe this would be possible from a development standpoint and what sort of feedback can you provide on the probability of an enhancement like this.Just in case you haven't tried the following :
When in last cell of the last row, you can hit Tab key and that would create a new row and the focus would be in the first cell of the newly created row.
So you don't need to hit the insert row button. Btw, you can also set an accelerator for "Insert Row" using Preferences->Accelerators.
So, probably your feature request could be to - automatically create appropriate # of rows and insert data into those when you paste the data copied from excel into the grid. That should save you a few clicks and eliminate the need of having a textfield to set the # of rows.
-Raghu -
Inserting rows in table in web template
How do I insert rows in an already existing table in a web template?
Thanks,
SanjeevHi Gillian,
By table I meant the layout table, within which you can have multiple queries, the result of each displayed in the manner in which the Web Items are arranged within this table. I think you thought I meant a table Web Item.
I have a 3x3 table (which I obtained by clicking Insert -> Table -> Insert Table in the menu bar) within which I have 7 Web Items of 'Chart' type. I want to add a few more Web Items to this table, so I want to add rows to it.
Thanks,
Sanjeev -
Tuning an insert sql that inserts a million rows doing a full table scan
Hi Experts,
I am on Oracle 11.2.0.3 on Linux. I have a sql that inserts data in a history/archive table from a main application table based on date. The application table has 3 million rows in it. and all rows that are older then 6 months should go into a history/archive table. this was recently decided and we have 1 million rows that satisfy this criteria. This insert into archive table is taking about 3 minutes. The explain plan shows a full table scan on the main table - which is the right thing as we are pulling out 1 million rows from main table into history table.
My question is that, is there a way I can make this sql go faster?
Here is the query plan (I changed the table names etc.)
INSERT INTO EMP_ARCH
SELECT *
FROM EMP M
where HIRE_date < (sysdate - :v_num_days);
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 2 96.22 165.59 92266 147180 8529323 1441230
Fetch 0 0.00 0.00 0 0 0 0
total 4 96.22 165.59 92266 147180 8529323 1441230
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: FIRST_ROWS
Parsing user id: 166
Rows Row Source Operation
1441401 TABLE ACCESS FULL EMP (cr=52900 pr=52885 pw=0 time=21189581 us)
I heard that there is a way to use opt_param hint to increase the multiblock read count but didn't seem to work for me....I will be thankful for suggestions on this. also can collections and changing this to pl/sql make it faster?
Thanks,
OrauserNAlso I wish experts share their insight on how we make full table scan go faster (apart from parallel suggestion I mean).
Please make up your mind about what question you actually want help with.
First you said you want help making the INSERT query go faster but the rest of your replies, including the above statement, imply that you are obsessed with making full table scans go faster.
You also said:
our management would like us to come forth with the best way to do it
But when people make suggestions you make replies about you and your abilities:
I do not have the liberty to do the "alter session enable parallel dml". I have to work within this constraings
Does 'management' want the best way to do whichever question you are asking?
Or is is just YOU that want the best way (whatever you mean by best) based on some unknown set of constraints?
As SB already said, you clearly do NOT have an actual problem since you have already completed the task of inserting the data, several times in fact. So the time it takes to do it is irrevelant.
There is no universal agreement on what the word 'best' means for any given use case and you haven't given us your definition either. So how would we know what might be 'best'?
So until you provide the COMPLETE list of constraints you are just wasting our time asking for suggestions that you refute with a comment about some 'constraint' you have.
You also haven't provided ANY information that indicates that it is the full table scan that is the root of the problem. It is far more likely to be the INSERT into the table and a simple use of NOLOGGING with an APPEND hint might be all that is needed.
IMHO the 'best' way would be to partition both the source and target tables and just use EXCHANGE PARTITION to move the data. That operation would only take a millisecond or two.
But, let me guess, that would not conform to one of your 'unknown' constraints would it? -
Inserting 10 million rows in to a table hangs
HI through toad iam using a simple for loop to insert 10 million rows into a table by saying
for i in 1 ......10000000
insert.................
It hangs ........ for lot of time
is there a better way to insert the rows in to the table....?
i have to test for performance.... and i have to insert 50 million rows in its child table..
practically when the code moves to production it will have these many rows...(may be more also) thats why i have to test for these many rows
plz suggest a better way for this
Regards
rajMust be a 'hardware thing'.
My ancient desktop (pentium IV, 1.8 Ghz, 512 MB), running XE, needs:
MHO%xe> desc t
Naam Null? Type
N NUMBER
A VARCHAR2(10)
B VARCHAR2(10)
MHO%xe> insert /*+ APPEND */ into t
2 with my_data as (
3 select level n, 'abc' a, 'def' b from dual
4 connect by level <= 10000000
5 )
6 select * from my_data;
10000000 rijen zijn aangemaakt.
Verstreken: 00:04:09.71
MHO%xe> drop table t;
Tabel is verwijderd.
Verstreken: 00:00:31.50
MHO%xe> create table t (n number, a varchar2(10), b varchar2(10));
Tabel is aangemaakt.
Verstreken: 00:00:01.04
MHO%xe> insert into t
2 with my_data as (
3 select level n, 'abc' a, 'def' b from dual
4 connect by level <= 10000000
5 )
6 select * from my_data;
10000000 rijen zijn aangemaakt.
Verstreken: 00:02:44.12
MHO%xe> drop table t;
Tabel is verwijderd.
Verstreken: 00:00:09.46
MHO%xe> create table t (n number, a varchar2(10), b varchar2(10));
Tabel is aangemaakt.
Verstreken: 00:00:00.15
MHO%xe> insert /*+ APPEND */ into t
2 with my_data as (
3 select level n, 'abc' a, 'def' b from dual
4 connect by level <= 10000000
5 )
6 select * from my_data;
10000000 rijen zijn aangemaakt.
Verstreken: 00:01:03.89
MHO%xe> drop table t;
Tabel is verwijderd.
Verstreken: 00:00:27.17
MHO%xe> create table t (n number, a varchar2(10), b varchar2(10));
Tabel is aangemaakt.
Verstreken: 00:00:01.15
MHO%xe> insert into t
2 with my_data as (
3 select level n, 'abc' a, 'def' b from dual
4 connect by level <= 10000000
5 )
6 select * from my_data;
10000000 rijen zijn aangemaakt.
Verstreken: 00:01:56.10Yea, 'cached' it a bit (ofcourse ;) )
But the append hint seems to knibble about 50 sec off anyway (using NO indexes at all) on my 'configuration'. -
Hi
I want to display a message after inserting rows in table like *'you have inserted a new row successfully*'.
i am using the createinsert ADF Button to insert the rows in table.after that i am comitting it.
after commiting i want to display message for the user.for this what i need to do.
Please help me.
Sailaja.user10860137
Can you please explain me the each line in the code briefly.
+public String saveButton_action(){+
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
+// note "!" operator has been removed from the default code.+
+if(operationBinding.getErrors().isEmpty()){+
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage saveMsg = new FacesMessage("Record Saved Successfully");
ctx.addMessage(null,saveMsg);
+}+
return null;
+}+
And i have requirement to show the message on favcet "status bar".not in a popup window.(from the above code the message is showing in popup window. )the Layout i am using is PanelCollection.
can you tell me what i need to do.
Thanks
Sailaja.
Edited by: sj0609 on Mar 19, 2009 8:03 AM -
Insert rows from l_qte_rec in to tmp table
xxx_pre_update_userbook(p_service_request_id number, p_sr_type_id number, p_status_id number,
p_resolution_code varchar2, p_bill_to_customer_id number,
p_bill_to_cust_account_id number, p_bill_to_customer_site_id number,
p_contract_id number, p_contract_line_id number,
p_resolution_summary varchar2,
x_status out varchar2, x_mesg out varchar2) as
l_proj_incident_type_id number;
l_isr_incident_type_id number;
l_tac_incident_type_id number;
l_status varchar2(10) := 'S';
l_sr_closing_flag number;
l_mesg varchar2(3000) := null;
err_mesg varchar2(3000) := null;
L_SO_ID NUMBER;
L_LINK_REC CS_INCIDENTLINKS_PUB.CS_INCIDENT_LINK_REC_TYPE;
L_OBJECT_VERSION_NUMBER NUMBER;
L_RECIPROCAL_LINK_ID NUMBER;
L_LINK_ID NUMBER;
l_QTE_REC ASO_QUOTE_PUB.qte_header_rec_type;
l_control_REC ASO_ORDER_INT.control_rec_type;
l_Order_Header_Rec ASO_ORDER_INT.Order_Header_Rec_Type;
l_Order_Line_Tbl ASO_ORDER_INT.Order_Line_Tbl_type;
l_Return_Status VARCHAR2(30);
l_Msg_Count NUMBER;
l_Msg_Data VARCHAR2(3000);
l_Msg_INDEX_OUT NUMBER;
l_OUT_MESSAGE VARCHAR2(3000);
l_proj_flag number;
l_quote_status_id number;
l_orders_created number;
l_chargeable_sr_flag number;
l_sr_close_flag number;
l_invalid_outage_info number;
begin
l_status := 'S';
l_mesg := null;
-- MO_GLOBAL.INIT('CS');
-- Get the Project Service Request Id
select incident_type_id into l_proj_incident_type_id
from cs_incident_types_tl
where name like 'XXX TAC Project'
-- and language = 'US'
and rownum < 2;
-- Get the ISR Service Request Id
select incident_type_id into l_isr_incident_type_id
from cs_incident_types_tl
where name like 'XXX TAC ISR'
-- and language = 'US'
and rownum < 2;
-- Get the TNT TAC Service Request Id
select incident_type_id into l_tac_incident_type_id
from cs_incident_types_tl
where name like 'XXX TAC Service Request'
and rownum < 2;
-- and language = 'US';
select nvl((select 1
from dual
where exists( select incident_status_id
from cs_incident_statuses_b
where incident_status_id = p_status_id
and close_flag is not null
and close_flag = 'Y')
and ( p_resolution_code is null
or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
and p_sr_type_id in ( l_isr_incident_type_id )),0) into l_chargeable_sr_flag
from dual;
select nvl((select 1
from dual
where exists( select incident_status_id
from cs_incident_statuses_b
where incident_status_id = p_status_id
and close_flag is not null
and close_flag = 'Y')
and ( p_resolution_code is null
or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
),0) into l_sr_closing_flag
from dual;
if ( l_sr_closing_flag = 1 and ((p_resolution_summary is null) or (p_resolution_summary = FND_API.G_MISS_CHAR)) ) then
x_status := 'F';
--x_mesg := 'Resolution Summary can not be empty while closing Service request';
fnd_message.set_name ('XXXXX', 'MISSING_RESOLUTION_SUMMARY');
-- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
fnd_msg_pub.ADD;
end if;
-- Check whether outage information is complete at the time of closure.
if ( l_sr_closing_flag = 1 ) then
l_invalid_outage_info := 0;
select nvl((select 1
from dual
where exists ( select 1
from cs_incidents_ext cie, ego_fnd_dsc_flx_ctx_ext grp1
where incident_id = p_service_request_id
and grp1.application_id = 170
and grp1.descriptive_flexfield_name like 'XX_SR_CONTEXT'
and grp1.descriptive_flex_context_code like 'XXXXXOutageTab'
and cie.attr_group_id = grp1.attr_group_id
and ( c_ext_attr1 is null or c_ext_attr2 is null or c_ext_attr3 is null or
c_ext_attr4 is null or c_ext_attr5 is null or c_ext_attr6 is null or
c_ext_attr7 is null or n_ext_attr1 is null or n_ext_attr2 is null or
n_ext_attr3 is null or n_ext_attr4 is null or n_ext_attr5 is null or
d_ext_attr1 is null or d_ext_attr2 is null or d_ext_attr3 is null)
-- if all of them are null then we should ignore
and NOT ( c_ext_attr1 is null and c_ext_attr2 is null and c_ext_attr3 is null and
c_ext_attr4 is null and c_ext_attr5 is null and c_ext_attr6 is null and
c_ext_attr7 is null and n_ext_attr1 is null and n_ext_attr2 is null and
n_ext_attr3 is null and n_ext_attr4 is null and n_ext_attr5 is null and
d_ext_attr1 is null and d_ext_attr2 is null and d_ext_attr3 is null))), 0) into l_invalid_outage_info
from dual;
if ( l_invalid_outage_info = 1 ) then
x_status := 'F';
fnd_message.set_name ('XXXXX', 'MISSING_OUTAGE_INFORMATION');
fnd_msg_pub.ADD;
end if;
end if;
if ( (p_sr_type_id in ( l_isr_incident_type_id )) and (l_chargeable_sr_flag = 1) ) then
if ( ( p_bill_to_customer_id is null or p_bill_to_cust_account_id is null or
p_bill_to_customer_site_id is null )) then
x_status := 'F';
--x_mesg := 'Bill to customer name/account/site is empty';
fnd_message.set_name ('XXXXX', 'ISR_INVALID_BILL_TO');
-- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
fnd_msg_pub.ADD;
else
select count(*) into l_orders_created
from cs_incident_links
where subject_id = p_service_request_id
and subject_type = 'SR'
and object_type = 'ORDERS';
/* If orders are not created for this SR then create the order */
if ( l_orders_created = 0 ) then
/* Create Order */
err_mesg := 'Got the Incident Types and Incidents Status flag';
select nvl((select quote_status_id
from aso_quote_statuses_tl
where language = 'US'
and upper(meaning) = 'ENTERED'), 0) into l_quote_Status_id
from dual;
err_mesg := 'Got the Quote Status Id';
l_qte_rec.party_id := p_bill_to_customer_id;
* l_qte_rec.party_id := p_bill_to_customer_id;
* l_qte_rec.cust_party_id := p_bill_to_customer_id;
* l_qte_rec.cust_account_id := p_bill_to_cust_account_id;
* l_qte_rec.INVOICE_TO_CUST_PARTY_ID := p_bill_to_customer_id;
* l_qte_rec.INVOICE_TO_CUST_ACCOUNT_ID := p_bill_to_cust_account_id;
* l_qte_rec.INVOICE_TO_PARTY_SITE_ID := p_bill_to_customer_site_id;
* l_qte_rec.INVOICE_TO_PARTY_ID := p_bill_to_customer_id;
* l_qte_rec.quote_status_id := l_quote_status_id;
* l_qte_rec.quote_status_code := 'ENTERED';
* l_qte_rec.quote_status := 'ENTERED';
* l_control_rec.book_flag := 'N';
* err_mesg := 'set the Quote Header';*
* select nvl((select transaction_type_id*
* from oe_transaction_types_v*
* where name like 'Service Order'), 0 ) into l_qte_rec.order_type_id*
* from dual;*
* err_mesg := 'Got Order Type';*
* l_qte_rec.currency_code := 'USD';
how to insert rows in tmp table from rec_type which is in bold text .... i want to insert after the last statement .this is for debugging after executing the procedureNo version number and lots of other missing information.
That said look at the example here:
http://www.morganslibrary.org/reference/insert.html
under "RECORD INSERT." -
BAPI to insert a new row in the MCHA table
Hi all,
I am in search of a BAPI to insert a new row in the MCHA table... with the fields of the materail, plant and batch values.
Any inputs on this..is highly appreciable...
thanks in advance...
regards..
prathima.explore BAPI_BATCH_CREATE
Maybe you are looking for
-
How to capture the web:input_email element?
while i try to capture the input box which is the type of "email" but its getting captured as web.element web.element( 112, "/web:window[@index='0' or @title='salesforce.com - Customer Secure Login Page']/web:document[@index='0']/web:form[@name='
-
OnLocation - can I change the codec?
Hello, I am using OnLocation CS4 with a Canon XH A1s camera which records in HDV format on a MiniDV tape. I was able to record fromt eh camera to the Laptop and it looked great! I was wondering if there is any way I could record to a different codec
-
IPhoto keeps quitting "unexpectedly" when exporting to FB/Flikr
And gives me a message saying it has deleted the Flikr/FB album but the images still exist in iPhoto. It has happened several times. One time, the photos actually were NOT retained in iPhoto -- the date/event folder that held them in inexplicably emp
-
Hi experts, Please help me out as i am new to abap.My problem is how to create a detailed report for listing Goods Receipts by material wise for a given period, which contains detailed information like PO No, PO Date, Plant, GR ref, GR date, Material
-
Changing Exchange OWA URL, and MX record
Hi all, We are planning to change our Exchange OWA URL from "https://webmail.saigon.com" to "https://webmail.city.saigon.com" My question is Do I need to do anything to the MX record? The Exchange server name and IP remain the same. Only the URL ge