Merge tables
Hi,
I have two partitioned tables.
Table 1 has 15 partitions and each partition has around 3 million records.
Table 2 has 20 partitions and each partition has around 3 million records.
I want to merge these two tables in to one table so that the new table has all the partitions with respective tablespaces.
Any suggestions and what would be the optimal way to do this?
Thanks in advance.
>
Can I exchange partitions between two partitioned tables?
>
Yes - but not the way you are trying. You have to RTFM! I pointed out the exact section of the document that applies to your use case. You have to do the exchange the way the documentation says: via a hash-partitioned work table.
Here is a solution that people may want to add to their toolkit.
This example code effectively moves the 4 partitions of the EMP_PART table to the same, but empty, partitions of the EMP_PART_NEW table using the EMP_PART_HASH work table.
-- EMP_PART table has 4 range partitions with data in each partition
-- this data will be moved (via partition exchange) to the EMP_PART_NEW table
DROP TABLE EMP_PART;
CREATE TABLE emp_part (empno number(4), ename varchar2(10),
deptno number(2), created_date DATE default sysdate)
partition by range (created_date)
SUBPARTITION BY HASH(deptno) subpartitions 4
( partition p1 values less than (to_date('01-01-2013', 'mm-dd-yyyy')),
partition p2 values less than (to_date('01-02-2013', 'mm-dd-yyyy')),
partition p3 values less than (to_date('01-03-2013', 'mm-dd-yyyy')),
partition p4 values less than (to_date('01-04-2013', 'mm-dd-yyyy')));
INSERT INTO EMP_PART VALUES (1, 'EMP1', 1, SYSDATE - 7);
INSERT INTO EMP_PART VALUES (1, 'EMP1', 1, SYSDATE - 6);
INSERT INTO EMP_PART VALUES (1, 'EMP1', 1, SYSDATE - 5);
INSERT INTO EMP_PART VALUES (1, 'EMP1', 1, SYSDATE - 4);
-- EMP_PART_NEW table has 7 range partitions - only partitions p5, p6 and p7 have data
-- Partitions p1, p2, p3 and p4 will receive data from the emp_part table via the emp_part_hash
-- work table
DROP TABLE EMP_PART_NEW;
CREATE TABLE emp_part_new (empno number(4), ename varchar2(10),
deptno number(2), created_date DATE default sysdate)
partition by range (created_date)
SUBPARTITION BY HASH(deptno) subpartitions 4
( partition p1 values less than (to_date('01-01-2013', 'mm-dd-yyyy')),
partition p2 values less than (to_date('01-02-2013', 'mm-dd-yyyy')),
partition p3 values less than (to_date('01-03-2013', 'mm-dd-yyyy')),
partition p4 values less than (to_date('01-04-2013', 'mm-dd-yyyy')),
partition p5 values less than (to_date('01-05-2013', 'mm-dd-yyyy')),
partition p6 values less than (to_date('01-06-2013', 'mm-dd-yyyy')),
partition p7 values less than (to_date('01-07-2013', 'mm-dd-yyyy')));
INSERT INTO EMP_PART_NEW VALUES (1, 'EMP1', 1, SYSDATE - 3);
INSERT INTO EMP_PART_NEW VALUES (1, 'EMP1', 1, SYSDATE - 2);
INSERT INTO EMP_PART_NEW VALUES (1, 'EMP1', 1, SYSDATE - 1);
-- work table for the exchange
DROP TABLE EMP_PART_HASH;
CREATE TABLE emp_part_hash (empno number(4), ename varchar2(10),
deptno number(2), created_date DATE default sysdate)
partition by hash (deptno) partitions 4;
SELECT * FROM EMP_PART PARTITION (P2);
EMPNO ENAME DEPTNO CREATED_DATE
1 EMP1 1 1/1/2013 6:52:54 PM
select * from emp_part order by created_date;
EMPNO ENAME DEPTNO CREATED_DATE
1 EMP1 1 12/31/2012 6:52:52 PM
1 EMP1 1 1/1/2013 6:52:54 PM
1 EMP1 1 1/2/2013 6:52:56 PM
1 EMP1 1 1/3/2013 6:52:58 PM
select * from emp_part_new partition (p6);
EMPNO ENAME DEPTNO CREATED_DATE
1 EMP1 1 1/5/2013 6:53:21 PM
select * from emp_part_new order by created_date;
EMPNO ENAME DEPTNO CREATED_DATE
1 EMP1 1 1/4/2013 6:53:19 PM
1 EMP1 1 1/5/2013 6:53:21 PM
1 EMP1 1 1/6/2013 6:53:23 PM
-- exchange each partition from emp_part with the work table
-- and then exchange the work table with the same partition of the emp_part_new table
alter table emp_part exchange partition p1
with table emp_part_hash;
alter table emp_part_new exchange partition p1
with table emp_part_hash;
alter table emp_part exchange partition p2
with table emp_part_hash;
alter table emp_part_new exchange partition p2
with table emp_part_hash;
alter table emp_part exchange partition p3
with table emp_part_hash;
alter table emp_part_new exchange partition p3
with table emp_part_hash;
alter table emp_part exchange partition p4
with table emp_part_hash;
alter table emp_part_new exchange partition p4
with table emp_part_hash;
select * from emp_part order by created_date;
-- no data
select * from emp_part_new order by created_date;
EMPNO ENAME DEPTNO CREATED_DATE
1 EMP1 1 12/31/2012 6:52:52 PM
1 EMP1 1 1/1/2013 6:52:54 PM
1 EMP1 1 1/2/2013 6:52:56 PM
1 EMP1 1 1/3/2013 6:52:58 PM
1 EMP1 1 1/4/2013 6:53:19 PM
1 EMP1 1 1/5/2013 6:53:21 PM
1 EMP1 1 1/6/2013 6:53:23 PMNote that:
1. All three tables have the same structure
2. All three tables have the same number of HASH partitions. For the two real tables they are HASH subpartitions
3. The work table has ONLY hash partitions: there are no range partitions.
4. All of the exchanges are merely data dictionary updates and complete in a fraction of a second no matter how much data there is in any of the actual partitions.
Similar Messages
-
Merge table indexes fill factor
Shouldn't indexes such as MSmerge_current_partition_mappings.ncMSmerge_current_partition_mappings have a fill factor other than 0? I am getting many page splits on this and other merge table indexes. My server has many of the indexes set to 0.
Using merge replication with 120 subscribers SQL Server 2008 R2 on distribution server.These are large tables. 62 million rows in MSmerge_current_partition_mappings. We are seeing high IO numbers and I ran this query with results
SELECT COUNT(1) AS NumberOfSplits
,AllocUnitName ,Context
FROM fn_dblog(NULL,NULL)
WHERE Operation = 'LOP_DELETE_SPLIT'
GROUP BY AllocUnitName, Context
ORDER BY NumberOfSplits DESC
984 dbo.MSmerge_current_partition_mappings.ncMSmerge_current_partition_mappings
LCX_INDEX_LEAF
443 dbo.MSmerge_contents.uc1SycContents
LCX_CLUSTERED
340 dbo.MSmerge_contents.nc5MSmerge_contents
LCX_INDEX_LEAF
268 dbo.MSmerge_current_partition_mappings.cMSmerge_current_partition_mappings
LCX_CLUSTERED
208 dbo.MSmerge_contents.nc3MSmerge_contents
LCX_INDEX_LEAF
159 dbo.MSmerge_contents.nc4MSmerge_contents
LCX_INDEX_LEAF -
Is it possible in CS4 to combine two separate tables into 1?
Hi Subligaria,
Use this link. this is a free script to merge tables vertically and horizontally....
http://in-tools.com/article/scripts-blog/merge-tables-script/
If you want to do manually insert empty rows & colums and then copy-paste the table you want to merge.
Thanks,
Green4ever -
[JS CS3] Merging table columns
Hi all,
What's the fastest way to merge columns in a table?
I'm using the following loop to merge the 4th and 5th columns in my table:
for( var f = myTable.rows.length-1; f >= 0; f-- ){
myTable.columns[3].cells[f].merge (myTable.columns[4].cells[f])
It works, but I'm working on a large table (120 pages worth) and have many instance where I need to merge columns. Using the loop above, the script takes hours to run. Is there a faster way to merge columns while keeping the rows intact?
Thanks,
MichaelI've just done some time testing with CS4 and found the following:
table = app.documents[0].stories[0].tables[0];
start = new Date();
for (var n = 0; 100 > n; n++) {
cells = table.cells;
for (var j = 0; cells.length > j; j++) {
cells[j].contents = "James";
end = new Date();
alert(end - start);
takes just about the same time to run as:
table = app.documents[0].stories[0].tables[0];
start = new Date();
rowCount = table.rows.length;
columnCount = table.columns.length;
for (var n = 0; 100 > n; n++) {
for (var c = 0; columnCount > c; c++) {
for (var r = 0; rowCount > r; r++) {
table.cells.item(c + ":" + r).contents = "Harry";
end = new Date();
alert(end - start);
While this version takes about half as long again:
table = app.documents[0].stories[0].tables[0];
start = new Date();
rowCount = table.rows.length;
columnCount = table.columns.length;
for (var n = 0; 100 > n; n++) {
for (var c = 0; columnCount > c; c++) {
for (var r = 0; rowCount > r; r++) {
table.rows[r].cells[c].contents = "Harry";
end = new Date();
alert(end - start);
None of which is particularly surprising. But when I compared the following two scripts, I was astonished by the result:
table = app.documents[0].stories[0].tables[0];
start = new Date();
rowCount = table.rows.length;
columnCount = table.columns.length;
for (var n = 0; 100 > n; n++) {
table.cells.everyItem().contents = "Harry";
end = new Date();
alert(end - start);
table = app.documents[0].stories[0].tables[0];
start = new Date();
rowCount = table.rows.length;
columnCount = table.columns.length;
for (var n = 0; 100 > n; n++) {
table.cells.itemByRange(0, -1).contents = "George";
end = new Date();
alert(end - start);
The latter, using itemByRange was about a third faster than using everyItem(). 1800 milliseconds to 2700 on a 4 x 10 table.
Dave -
Table with XSD binding merge tables data
Hi All,
Case 1 : If i bind the table to XSD,and create a few table. After save the form and re-open the pdf, all the table data are merged.
Case 2 : If i remove the table binding and create tables., after save the form and re-open the pdf, then the tables are not merged.
but, i need to have the table binding as later i will used that to capture data from the pdf.
If anyone have any suggestion , please advice.
The Dinamic PDF Form
Data entry into the 2 table
After Save and Re-Open the form ( The table data are merged )Hi,
I could not use both solution because I've two list (two data model) from different source, when the jsf page is generated it generated the correct number of column and output text but when I try to retrieve the component output text for example the 1 row and the second output text I got a null pointer exception because the column only have 1 child and not the full elements that we can see at html rendering.
There is no solution for getting the full list of components before the page is generated ? because findComponent recursivly called doesn't found what I want. -
Merging table cells in Smartform
Hi ABAP Technical Consultants,
Have a doubt in merging cells in Smart form.
My doubt is -- I have taken one table with two line types. First line type containing 9 columns & second line type containing 17 columns. But First line type first cell width is 1.88 cm & it does not have data and second line type first cell is 1.88 cm & it has some data (This is static data).
Now my requirement is I want to merge " First line type first cell & second line type first cell ". Is it able to do in smart form development?
If you have any ideas and views, please share with me & waiting for your pamper information.
NOTE: Here data is static, not getting data either from internal table nor work area.
Thanks
venkat
Edited by: venkatehBI on Feb 11, 2011 8:42 AMIf you are using table, then realign the table my adding 2 cells in a row. Go to Main window==> table==> table tab==> click on details.. Now you will get the row details. Choose the row where you wants the merge. Let us consider you wants to merge cell 3 (2cm) & 4 (1 cm). then put 2 +1 = 3 cm for cell 3 and delete cell 4. Note: content will be deleted for this
-
I've been doing this by selecting a row and then applying a cell merge. Thing is, i've been working with lots of tables that need this done and i'm kind of tired of having to select each row to merge it. The document i get from the editors has to be divided into columns. help? i'd like to be able to select the whole table and say "merge row ONLY"
Yamina Palma wrote:
i'm using indesign
Why were you not kind enough to state this in your first post? geez!
We're not mind readers here. No one would have known what to suggest to you. Please show some respect to the mere mortals that freely offer their assistance here. If you want a proper reply, make a proper post in the proper forum.
Michael's response had no malice in it. Your reply post clearly did. -
Creating new Layout problem with merged table within std_resources.htm
Dear All,
i am relatively new to oracle ucm and i am trying to add new comonent to create new layout from oracle Create and Modify Layout Sample Component* example under http://www.oracle.com/technetwork/middleware/content-management/index-092832.html .
i want to ask about the following
in this component i have CreateLayout_Layouts Table, CreateLayout_PublishedWeblayoutFiles Table and CreateLayout_PublishedStaticFiles Table. These tables should be merged with LmLayouts table, PublishedWeblayoutFiles table and PublishedStaticFiles table respectively in the std_resources.htm file in the <install_dir>/shared/config/resources directory.
The problem is in my std_resources.htm file i have the following :
<tr>
<td>LmLayouts</td><td>LmLayouts</td><td>LmLayouts</td><td>id</td><td>label</td>
<td></td><td>7.3</td><td>1</td>
</tr>
how can i add (merge) the CreateLayout_Layouts Table in LmLayouts table? what is should fill the <td>s ?
for PublishedWeblayoutFiles table and PublishedStaticFiles table they are not exist in my std_resources.htm file. are there names changed? or shall i add them(if yes, what is the <td>s had inside).
note: i will be greatfull if someone have the std_resources.htm that have the above tables merged with the specified ones.I believe that sample is old. i have been pushing to get an updated version out also. Hopefully the fragmentary information I will give here will help.
The main changes are dynamic data tables which replace the includes to control the menu items and relationships. The old things should work still but good to use the new. At the end is an example of merge rules.
See 3.5.2 Dynamic Data Tables
http://docs.oracle.com/cd/E21764_01/doc.1111/e10807/c03_components.htm
==============================
CoreMenuItemRelationships table example
<?commatable mergeKey="primaryKey" derivedColumns="primaryKey:parentId+id"?>
parentId, id, loadOrder
MY_CONTENT, NEW_PAGE, 9000
================================
CoreMenuItems table example
<?commatable mergeKey="primaryKey" derivedColumns="primaryKey:parentId+id"?>
id, label, linkType, linkData
NEW_PAGE, wwNewPage, cgi, IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=NEW_PAGE
============================
CoreMenuItemsFlags table example
<?commatable indexedColumns="id"?>
id, flags
WORK_IN_PROGRESS, isSubAdmin
=======================
CoreMenuItemsImages table example
<?commatable indexedColumns="id"?>
id, image, imageOpen
ACTIVE_WORKFLOWS, ReviewContent.gif,
Glue file example: (note I am not willing to upload a zip file of a full component sorry)
<?hda version="11gR1-dev" jcharset="UTF8" encoding="utf-8"?>
@Properties LocalData
ComponentName=NewLayout
blDateFormat=M/d/yyyy {h:mm[:ss] {aa}[zzz]}!mAM,PM!tAmerica/Chicago
hasPreferenceData=0
preventAdditionalComponentDowngrade=0
serverVersion=7.1
version=2011_11_13-dev
@end
@ResultSet ResourceDefinition
4
type
filename
tables
loadOrder
resource
resources/newlayout_resource.htm
null
10
template
templates/newlayout_template.hda
null
10
resource
resources/newlayout_strings.htm
null
10
@end
@ResultSet Filters
4
type
location
parameter
loadOrder
@end
@ResultSet MergeRules
4
fromTable
toTable
column
loadOrder
NewLayout_Layouts
LmLayouts
id
10
NewLayout_PublishedWeblayoutFiles
PublishedWeblayoutFiles
path
10
NewLayout_PublishedStaticFiles
PublishedStaticFiles
null
10
NewLayout_LayoutSkinPairs
LmLayoutSkinPairs
null
10
NewLayout_Templates
IntradocTemplates
name
10
@end
@ResultSet ClassAliases
3
classname
location
loadOrder
@end -
It seem you can add and delete cells in a table. But, can you
merge them? I haven't been able to find a merge command in any of
the menus.quote:
I'll pass this on to the engineering team.
To add to that,
I think it would also be go to be able to split single cells
into 2 cells, not to add a row or column but to say, have 1 row
have 2 columns, but the right-most column would have 2 rows built
into it. Let me know if I am being unclear.
Great product. -
ABAP RFC Function to merger table data?
Hi All,
Has anybody tried to merger that from multiple table in 1 table using ABAP RFC function module.
I have to merger 3 table into 1 which I am not able to do using Combine or Union operater.
One solution suggested in the below thread by Marcel was to use ABAP RFC function mod..I dont know how to do that.
If anybody has tried please share.
Union operator between tables
Thanks,
Murtuza.Thank you for the reply,
I got the solution without ABAP code.
I created a structure of table (Key Figures) in Column of query designer and then use that structure in VC to output table.
There I had used formula for each KeyFigures using IF ...something like this:-
NVAL(IF(@Key_Figures=="Prior Sales",0,IF(@Key_Figures=="Price",NVAL(IF(#ID[ACA257]@Price_Impact_value>=0,#ID[ACA257]@Prior_Sales_Value,#ID[ACA257]@Prior_Sales_Value+#ID[ACA257]@Price_Impact_value)),IF(@Key_Figures=="FX",#ID[ACA257]@GAP_3,IF(@Key_Figures=="Volume",#ID[ACA257]@GAP_4,IF(@Key_Figures=="Lost Mix",#ID[ACA257]@GAP_5_6,IF(@Key_Figures=="Gain Mix",#ID[ACA257]@GAP_5_6,IF(@Key_Figures=="Current Sales",0,123))))))))
This way I got the output table as required.
Pls see this thread for the requirement.
link: Table with Formula Values as output table? -
Merging and un-merging Tables (not talking about cells in a table).
Hello,
New to Mac-world and iWork 09. If I've two separate tables on a sheet and wanted to merge these two tables, also, if I've a table and would want to separate it into two or three etc. tables, can anyone help me doing this step by step, please?
Thanks in-advance.D,
Here's a step-by-step.
*Merging 2 tables.*
Here we shall assume for simplicity that there are no Footer Rows to deal with, at least not in the table that is going away.
First, make room in your receiving table, the one that you are going to end up with. (This isn't mandatory, but it helps with the visualization of what you will have when you are done.) To expand a table, click once inside it to activate it and then you will see three large dimpled gray handles; one in the lower right hand corner can be dragged to add both columns and rows at once, one at the lower left corner can be dragged to add rows and one in the upper right corner to add columns.
Now you have room to add your second table to your first.
Moving your second table's content into the first table is a four-step process.
1. Select all the cells in the second table that you wish to move.
2. Edit > Mark for Move
3. Select the cell in the first table where you want the upper left cell of the second table to go.
4. Edit > Move
Now you can clean up by deleting whatever is left of the second table that you didn't need to move.
*Separating one table into two or more tables.*
Lots of ways to do this, but here's my favorite.
1. In the Sheets Pane, click on the name of the table that you wish to split.
2. Edit > Copy , Edit > Paste , Select all cells in the new table, Delete them to clear the table.
Now you have a new table the same size as your original. Make as many copies of this new blank table as you are going to need. This would be a good time to rename the new tables in the Sheets Pane. Again, it's not mandatory that the new tables be the same size as the original, but that's a convenient place to begin.
3. Select a block of cells in the original table that you wish to split off.
4. Edit > Mark for Move
5. Select cell A1 in a blank table.
6. Edit > Move.
Repeat steps 3 to 6 as many times as needed.
Now you need to clean up the blank rows and columns, both in your decimated original table and in your oversized new tables. The easiest way if you don't have any rogue cell content is to activate a table, grab the big handle in the lower right corner and drag up and left until you can't go any further.
If you have any rogue cells, cells with perhaps accidental content away from your intended work, your table sizing handle will stop working when it runs against them. Any cell with content will block the table size reduction effort and if you want to shrink the table further you will have to either deal with the cells first or delete the rows and columns using other controls.
Regards,
Jerry -
Merge table issue CDR-03126 CDR-17026
Hello,
I am trying to do a check in on a table that is asking me to do a merge (version 1.5 and version 1.1CO(1)). I get the following errors. I checked the file that could not be found and it is there (cdrus.msg). Any help would be appreciated.
CDR-03126: Internal Error - Object Delta retrieval
CDR-17026: Not enough types were found.
The .msg message file 'c:\devsuitehome_1\repadm61\cdrus.msg' for product "CDRMSG61", utility "CDR" could not be found.
The .msg message file 'c:\devsuitehome_1\repadm61\cdrus.msg' for product "CDRMSG61", utility "CDR" could not be found.
Thanks
CathyHi Cathy,
Same here: CDR-03126: Internal Error - Object Delta retrieval
For nearly all our merge actions.
Did you find/get the solution already?
Help would be appreceated!
Kind Regards,
Wietze -
Merging table elements on Pages for iPad
Hi;
Is there a way to merge cells in Tables in Pages for iPad. For example merge few cells to apply text heading to cells below.
Thanks
Rich BaseckiHi,
I had the same problem. But I think I found the solution. All you need to do is the choose the first the cell that you want to merge then tap on the tool icon the one that looks like a wren. There will be two dots on the top left and bottom right of the cell. Now you can drag as many cells that you want to merge. Next tap in the cell and choose merge. The selected cells will merge.
Hope this helps. -
Report with merged table cells?
I would like to merge cells vertically on break columns in a report.
Something like:
| John | 123 Main |
| |------------------------------|
| | 456 First |
|-----------------------------------------|
| Jane | 789 Sycamore |
(you'll have to paste this and use a fixed font to see it properly)
Currently, by just setting break formating, I get an empty cell as the second row for John. I would like that cell below John to be merged with John (no border between).
How can I accomplish this?
VanSound like what youre looking for is a master-detail form. You can just use the wizard to create this. You will be asked for table names, columns to display etc., and everything will be generated for you. If you dont want to have the detail report or master record updateable, you can just change the display types to display-only.
Regards,
Marc -
Please see my other question "Forcing Page Breaks in Pages" for my thanks to this community, especially the expert users who are so generous with their time and expertise.
This is the second of two questions concerning using tables in Pages.
In a document I'm working on, I would like to re-combine parts of a table that has, overtime (this is a document imported from Word) gotten divided into several separate tables. Is it possible, in Pages, to merge these tables and make them all one big happy table again?Proto,
I don't know of a command that joins two tables, but I found that I can join tables by dragging one into another.
Try this: In the first (upper) table, add a blank row at the bottom. You can do this by selecting the lower right cell and hitting TAB. Next, select your following table and drag it into the (empty) left bottom cell of your first table.
I found that you can drag one table to any cell of another, and the results can be interesting depending on the relative sizes of the tables and what the insert point is.
Jerry
Maybe you are looking for
-
TRIPLEDES Encrypt/Decrypt in Oracle
We are having issues in oracle encryption/decryption. In our web application,We receive a number as input from the user which is encrypted & encoded using DES3 in .NET. This encrypted value is stored in the oracle database. We need to decrypt it in o
-
When importing WMV files, I only get the first few seconds of my movie.
I'm trying to do some color correction on a wedding video. The video was captured using Windows movie capture software and saved as a WMV file. The file is about 700MB and 50 minutes long. When I import the file it the Project tab says the duration
-
Is any one knows how to find a ipad only using the serialcode? please help
help guys ....please...
-
Still cannot change radio caption color by script
Hello, I've been trying to follow advice seen in other threads when developers wanted to inactivate radio button choices by script, and also turn the caption grey. What I'm finding is I can deactivate the choice but I just cannot turn the caption gre
-
My mac computer will not recognize my iPhone
Why won't my iPhone back up or sync with my mac now? My computer doesn't even recognize that my phone is plugged in. I've rebooted, switched cables, unchecked iCloud.