Create new table based on old table
Hello All,
I have a JTable. The user can re-arrange columns in this table. Then the user can select a couple rows and create a new selection set table based on these rows. The problem is as follows: When the user re-arranges the columns, I cannot seem to retrieve the new order.
Ex)
A table is created with fields: A B C
User rearranges to: B A C
I call code and fields are returned as: A B C
for(int i=0; i<((DefaultTableModel)super.getModel()).getColumnCount(); i++) {
String name = ((DefaultTableModel)super.getModel()).getColumnName(i);
System.out.println("Name: " + name);
}Thanks for any/all help!
Nevermind, got it to work by the below code. Still don't understand why the above code didn't work though.
Enumeration e = super.getTableHeader().getColumnModel().getColumns();
while(e.hasMoreElements()) {
String name = (String)((TableColumn)e.nextElement()).getHeaderValue();
System.out.println("Name: " + name);
}
Similar Messages
-
Create new CBO statistics for the tables
Dear All,
I am facing bad performance in server.In SM50 I see that the read and delete process at table D010LINC takes
a longer time.how to create new CBO statistics for the tables D010TAB and D010INC. Please suggest.
Regards,
KumarHi,
I am facing problem in when save/activating any problem ,so sap has told me to create new CBO statistics for the tables D010TAB and D010INC
Now as you have suggest when tx db20
Table D010LINC
there error comes Table D010LINC does not exist in the ABAP Dictionary
Table D010TAB
Statistics are current (|Changes| < 50 %)
New Method C
New Sample Size
Old Method C Date 10.03.2010
Old Sample Size Time 07:39:37
Old Number 51,104,357 Deviation Old -> New 0 %
New Number 51,168,679 Deviation New -> Old 0 %
Inserted Rows 160,770 Percentage Too Old 0 %
Changed Rows 0 Percentage Too Old 0 %
Deleted Rows 96,448 Percentage Too New 0 %
Use O
Active Flag P
Analysis Method C
Sample Size
Please suggest
Regards,
Kumar -
Best way to create a table based on another table
Hello,
I am trying to create a table based on another table with all the data in it. It has large data.
create table <tablename> as select * from table1.
Is this the best way of doing it or is there any other way. please advice.
thanksI am suggested to create new table as
create table <newtable> as
select * from <oldtable> where rownum < 1;
then
alter table <newtable> compress;
then
insert /*+ append */ into <newtable> as select * from <oldtable>;
but i getting an error saying missing values key words ora- 00926.
please advice -
Mail does not create new emails based on the highlighted mailbox, but rather according the receiving mailbox of whatever individual email happens to be highlighted. This was not the case prior to Lion. Is this a bug or an error on my part? (I do have the setting for creating new emails from the highlighted mailbox checked.)
The questions about time was not only because of thinking about the Time Machine, but also possible impact on recognizing which messages remaining on a POP server (doesn't apply to IMAP) have been already downloaded. In the Mail folder, at its root level, in Mail 3.x there is a file named MessageUidsAlreadyDownloaded3 that should prevent duplicate downloading -- some servers may not communicate the best with respect to that, and the universal index must certainly be involved in updating that index file. If it corrupts, it can inhibit proper downloading. However, setting the account up in a New User Account and having the same problem does not point that way, unless your POP3 server is very different from most.
That universal index is also typically involved when messages are meant to be moved from the Inbox to another mailbox -- in Mail 3.x the message does not move, but rather is copied, and then erased from the origin mailbox. That requires updating the Envelope Index to keep track of where the message is, and should keep track of where it is supposed to have been removed after the "Move".
Ernie -
How to update one table based on another table ??
Hello Friends:
I am trying to run the following query in oracle but it won't run.
UPDATE BOYS
SET
BOYS.AGE = GIRLS.AGE
FROM GIRLS
WHERE
BOYS.FIRSTNAME = GIRLS.FIRSTNAME AND
BOYS.LASTNAME = GIRLS.LASTNAME;
This query runs fine in sql server but in oracle its saying can't find "SET". PLease tell me what is the correct syntax in oracle to update one table based on another table.
thanksSee if this helps.
If you wrote an SQL statement:
update boys set age = 10;
Every row in the boys table will get updated with an age of 10. But if you wrote:
update boys set age = 10
where firstname = 'Joe';
Then only the rows where the firstname is Joe would be updated with an age of 10.
Now replace the 10 in the above statements with (select g.age from girls g where g.firstname = b.firstname and g.lastname = b.lastname) and replace where firstname = 'Joe' in the second statement with where exists (select null from girls g where g.firstname = b.firstname and g.lastname = b.lastname). The same concepts apply whether 10 is an actual value or a query and whether you have a where clause with the update statement to limit rows being updated.
About the select null question regarding the outer where clause:
Since the query is checking to see if the row in the girls table exists in the boys table what the column is in this select statement doesn't matter, this column isn't being used anywhere. In this case Todd chose to use null. He could have also used a column name from the table or a lot of times you'll see the literal value 1 used here. -
Creating new task based om completion of previous task in R17
Hi All,
Currently in R16, the workflow of creating new task based on "When Modified Record Saved" for Activity entity is not possible.
Meaning, for ACTIVITY it is not possible to generate new task based on completion of previous one, for example.
Will it be different in R17? will it be different in the future? Or we will always need to use web service to have this functionality?
Thanks
GuyI've looked at both threads, and there simply isn't enough information for me to tell you what is wrong. Please collect a trace (instructions in General forum) and open a case with CSS. CSS can provide more in depth analysis than what a forum
post allows.
As a shot in the dark, I have seen the issue outlined in the following KB article cause this exact same error message and symptom,
http://support.microsoft.com/kb/967902
Best Regards, Mike Briggs [MSFT] -- posting provided "AS IS" with no warranties and confers no rights -
How to create New columns for the Internal Table Dynamically?
HI Guys,
In my logic i have to create new columns depending on the logic which i am executing.
My requirement is .I have to display o/p like this
Material || Year || Period || Mix ratio || Vendor ||Mix Ratio || Vendor || Mix Ratio Vendor || Mix ratio || Vendor || Mix ratio.............................from table's CKMLMV003 and CKMLMV001.Her i have to display the o/p in the above format and i have to display Vendor and Mix Ratio for 5 columns irrespective of data .If i have more than 5 columns for any record then i have to create a New columns dynamically for Vendor and Mix ratio.If anybody want my code i can Submit But plz tell with example how to do?
<b>The O/P must be finally shown in ALV Grid</b>
Thanks,
GopiYou must create the entire internal table dynamically, you can not add columns to a statically define internal table. Here is an example of creating a dynamic internal table.
Creation of internal table dynamically based on the Date Range entered
Regards,
Rich Heilman -
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 -
Creating multiple tables based on existing tables
Hi,
I have to create 60 tables based on existing 60 tables. Instead of creating one by one how can I create all 60 at once.
The current 60 tables are named FY11_ACC1, FY11_ACC2, FY11_SALES1, FY11_SALES2 ...... , but all 60 tables start with FY11. I need to create the same structured tables but with FY12 names like FY12_ACC1, FY12_ACC2, FY12_SALES1, FY12_SALES2 .....
Currently I am using "create table FY12_ACC1 as select * from FY11_ACC1 where 1=0". Is there a way I can write all of them in one query?
Thanks for your time and help.ssk1974 wrote:
Hi,
I have to create 60 tables based on existing 60 tables. Instead of creating one by one how can I create all 60 at once.
The current 60 tables are named FY11_ACC1, FY11_ACC2, FY11_SALES1, FY11_SALES2 ...... , but all 60 tables start with FY11. I need to create the same structured tables but with FY12 names like FY12_ACC1, FY12_ACC2, FY12_SALES1, FY12_SALES2 .....
Currently I am using "create table FY12_ACC1 as select * from FY11_ACC1 where 1=0". Is there a way I can write all of them in one query?
Thanks for your time and help.Well, i'm assuming FY = Fiscal Year and 11 = 2011 and then ACC1 = Account #1.
From the sounds of things, your design isn't likely "correct'.
If you'd care to delve in to the requirements a little bit ... what you have and what you need (business speak wise) there are no shortage of experts here that i'm sure would be happy to help you.
If you're stuck with what you've got (or don't care to change your 'design') and all you care about is achieving that please disregard this message. -
Creation of new schema based on old schema
Hi,
I want to create a new schema with the different name based on the objects of the old schema.
For that I created a new user and schema and then imported the dump file into it. But problem is
I am not getting the external table structure, except that other objects are coming into new schema.
Ex: Old schema name "ABC", new schema name "XYZ"
ABC contains 15 normal tables, 3 external table, 2 procedure, 2 functions and 2 packages.
I want to have all these objects in this new schema.
Help me regarding this matter.
Thanks in advance,
NarayanHi,
Thanks Seenu,
So i have to clasify based on Maintenance activity types. If there are activities like repair, shutdown, testing etc. then i will have to create work center based on that?
So i can create some activities like, Modification, Repair, standby, waiting etc and assign work center for each?
Here we are following 4 maintenance planning preventive, predictive, breakdown & shutdown so is it possible to make 4 work center according to those.
please correct me if i m wrong. i really have no much idea in this. any help or suggestions will be appreciated.
Thanks in advance
Ramya -
CM25: Sort standard table based on custom table.
Hi Experts,
I need to sort the CM25 capacity table based on a ZTABLE where we will define the sequence number of each material. So when CM25 is executed the material should get sorted based on sequence number maintained in Ztable. Now the challenge is how to achieve this sorting before we display the capacity table.
anybody has faced such scenerio please help us.
There are few user exits available but not able to find out how to achieve the required functionality.
Regards,
Raghav
Edited by: Julius Bussche on Jul 30, 2009 9:29 AM
In future threads with meaningless subject titles will simply be deleted as you appear to be doing this intentionallyFirst, let me say that I have no experience with this CM25 table and where/how it is used or displayed, but here's how I look at it:
But what is the real problem?
1. Don't know the user exit / BAdI to be used?
2. Don't know how to do the sorting?
3. .....?
Answer:
1. This will be a matter of trying I would say and reading the documentation of the exit/BAdI.
2. You can do dynamic sorting of an internal table (if it is an internal table that is used before displaying it).
DATA: lv_sort1 TYPE CHAR10 VALUE 'NAME_OF_COLUMN_FROM_ZTABLE',
lv_sort2 TYPE CHAR10 VALUE 'NAME_OF_OTHER_COLUMN_FROM_ZTABLE'.
SORT itab BY (lv_sort1) ASCENDING (lv_sort2) DESCENDING.
Edited by: Micky Oestreich on Jul 30, 2009 7:34 AM -
Read contents of excel and create new List based on excel
HI,
I have a excel file, which is uploaded in a document library. I am using C# and VS 2010.
The excel file contains multiple sheets. I want to read the contents of the excel file and create a new List based on the contents of the excel file.
How to achieve this programmatically?
ThanksHi.
You can user OpenXML SDK to read excel Data.
http://msdn.microsoft.com/en-us/library/office/bb448854.aspx
Here an example of use.
http://zsvipullo.blogspot.it/2011/08/excel-helper-leggere-un-file-xlsx.html
Regards,
Bubu
http://zsvipullo.blogspot.it
Please mark my answer if it helped you, I would greatly appreciate it. -
Creat new admin cannot access old user accounts
i got a macbook running os x 10.6.8 i forget the admin account's password i created new administration account using command+s and typing following commands
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now
now i can not access my old data i got 80 gb hard drive i can only access 6 gb of it how can i access my old user accounts and all of its data
thanks for help in advance
regards
hardeepDoes the old user account have the same name as before , or has it been changed to 'xyz (deleted)' ?.
If it has a usable name, just go to System Preferences - Accounts & create a new one with that exact name.
Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents
You can then logout & into the 'new' one.
If the name needs changing : follow https://web.archive.org/web/20130919225809/http://support.apple.com/kb/HT1428
rather than the current version at Apple
If you want to continue using the new account you've already made, but access the old folders :
Select the old account home folder in Finder, then use Finder - File menu - Get info (command I). Open the 'Sharing & Permissions' section at the bottom, then click the padlock icon at bottom right & authenticate with an admin name & password.
Click the + button & add your new account name to the list, then select it & change 'Read only' to 'Read & Write'.
Now click the gear icon at the bottom & choose 'Apply to enclosed items...' -
"Create New" brings up the old
Why does this happen? I click "Create New" to start making a new slideshow. iDVD opens, but it still has the album(s) from the last slideshow I worked on. Before I can begin I have to delete the old. I would love to have a new blank screen come up ready to work on.
I am beginning to get the hang of this now I think. Is there any way to keep unwanted folders from appearing the the media pane? I created iDVD #1 and saved it. When I go to build iDVD #2 and place its folder, the media pane shows the image folders for both #1 and #2. When #3 is created, it's folder is added to the mix. The end result is that iDVD gets overloaded, so I delete folders #1 and #2 when I am working on #3. When I save and close that and want to work on #1, I have to delete the folders for #2 and #3, then go find the folder for #1 and replace it in the media pane. What a pain! Is there a better way to do this?
-
Create new Library still shows old Library names?
Old library was moved onto TCapsule. Create new Library does create
a new Library however all previous Library names are still there, (minus
the photos)
I need the new Library to show 2009 - Currently shows 2000, '01, '02 etc.Please describe the steps you used to get where you are now. From putting the old library into TM to creating the new one and what do you see and were do you see it.
TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.
Maybe you are looking for
-
Adding subtitles in Premiere Elements 13
How do I add subtitles/closed captioning (for the hard of hearing) into my video using Premiere Elements 13?
-
Ethernet driver for HP p7-1414
I need the Ethernet driver for my pc for Win 7. I have found all drivers including the WiFi driver so I can connect to Internet. But when I plug in my student cable, it doesn't do anything. My pc still remains connect wirelessly. So I need that drive
-
Need guidline to attach Date picker in Oracle report
I need to take the input from the date picker in oracle report (in runtime parameter form). Pls. help me if any one can
-
Hi Experts, I need to configure alerts dnamically for all types of errors, must to intimated to the registered users via email. Please suggest how this could be done. Regards, Sushama
-
When I go to any Google photo album, I get only the links and no pictures. I just changed routers. Could there be a switch that might have got accidentally turned off in Safari, that doesn't allow the pictures to come through? This is true with all p