About creating tables.

In an application I have to create simple tables, and I found class JTable from swing. However it is a JComponent while I would need an Image, BufferedImage, or ImageIcon object for representing the table to write it to an HTML file or export it as a graphics file. Is there a way I can create an ImageIcon through JTable, or any other? I tried the Component method createImage(width, height) but it always returns null. Could someone help me please?

Are you asking how to take a 'screenshot' of a component (in this instance a JTable)?
If that is the case the following code may be of use:
// create an image with the correct size
BufferedImage image = new BufferedImage(table.getWidth(),table.getHeight(),BufferedImage.TYPE_INT_RGB);
// get the graphics on which to paint.
Graphics g = image.getGraphics();
// The component you are taking an image of will be put here
// so you will need to re-add it back to your container...
JPanel p = new JPanel();
// this actually does the work of taking the shot.
SwingUtilities.paintComponent(g,table,p,0,0,image.getWidth(),image.getHeight());
try {
     // save the image to a file.
     ImageIO.write(image,"JPG",new File("c:\\testing.jpg"));
} catch (IOException e) {
     e.printStackTrace(); 
}This code works in Java 1.4.
-- Nate

Similar Messages

  • Beginners question about creating first database and tables

    Hi all,
    i recently have installed 10g express edition, because i want to transform my php-script from mysql to oracle database. (due to the fact that mysql is "not allowed sofware" at the company i work for).
    it is a quit small script, just a shift-report system, build because of frustration about an used shift report system based on excel sheets. Company likes it, but IT-department rejected it, because it is myssql. They do own a lot of oracle servers, so they set up a database for me, got a username and password.(Tnsnames entry). The rest i have to do by myself, no further support from IT department.
    I have made 2 simple php functions to connect to database:
    // for connection home server:
    function conn()
         $user = 'user';
         $password = 'password';
         $conn = oci_connect($user, $password, 'localhost/XE');
         return $conn;
    // for connection at work:
    function Xconn()
         $db = '(DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.eu.xxx.com)(PORT = 1521))
        (CONNECT_DATA = (SID = NVGPP)))';
         $user = 'xxxxxxxx';
         $password = 'xxxxxxx';
         $conn = oci_connect($user, $password, $db);
         return $conn;
    }I just add or remove X character before function name, for use at home or at work.
    both do work fine.
    First thing i wanted to do, is to create my database and tables.
    Schema dump from mysql:
    -- phpMyAdmin SQL Dump
    -- version 2.11.1
    -- http://www.phpmyadmin.net
    -- Host: localhost
    -- Generatie Tijd: 03 Aug 2010 om 21:35
    -- Server versie: 5.0.24
    -- PHP Versie: 5.2.4
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    -- Database: `ewb`
    -- Tabel structuur voor tabel `afsprakenblad`
    CREATE TABLE IF NOT EXISTS `afsprakenblad` (
      `id` mediumint(8) unsigned NOT NULL auto_increment,
      `naam` tinytext NOT NULL,
      `afspraak` text NOT NULL,
      KEY `id` (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Afsprakenblad' AUTO_INCREMENT=13 ;
    -- Tabel structuur voor tabel `verslag`
    CREATE TABLE IF NOT EXISTS `verslag` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `ewb_id` int(10) unsigned NOT NULL,
      `datum` date NOT NULL,
      `dienst` tinytext NOT NULL,
      `ploeg` tinytext NOT NULL,
      `gebouw` varchar(10) NOT NULL,
      `installatie` tinytext NOT NULL,
      `subdeel` tinytext NOT NULL,
      `subsubdeel` tinytext NOT NULL,
      `sap` int(4) unsigned NOT NULL,
      `tekst` text NOT NULL,
      `status` tinyint(3) unsigned NOT NULL,
      `afdeling` tinytext NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4663 ;
    -- Tabel structuur voor tabel `wachtverslag`
    CREATE TABLE IF NOT EXISTS `wachtverslag` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `datum` date NOT NULL,
      `dienst` tinytext NOT NULL,
      `team` tinytext NOT NULL,
      `afdeling` tinytext NOT NULL,
      `status` enum('open','dicht') NOT NULL default 'open',
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=800 ;When i wanted to create a new databse with: CREATE TABLE ewb, i get an error that databse already is mounted??
    How do i create this database and tables?
    after googling i read something about schema owners, but cant find anything about how to copy my mysql database/tables to oracle.
    Please, help is really appreciated by me.

    Translating from mysql to Oracle will need a bit of fixups for the DDL, once an oracle instance is created, set up and running, you won't create a database but you will have a database user or users that create/own a collection of tables, indexes, functions, procedures, etc.
    It will take a bit of pouring through the oracle documentation to get those table create statements to work, i.e. the engine=, charset=, auto_increment items won't succeed, datatypes need adjustments, the tic marks around the entity names aren't necessary, quite a few other items from the mysql data definition language don't have an oracle equivalent.

  • How do I go about this? Creating table while looping through dates?

    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!

    thedunnyman wrote:
    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!I hope you are asking about writing a query to DISPLAY the data that way ... not to actually create such a massively denormalized table ....

  • Question about creating new tables using SQL script in WebLogic Server

    Hi,
    I am new to WebLogic and I am following a book Java EE Development with Eclipse published by PACKT Publishing to learn
    Java EE.  I have installed Oracle Enterprise Pack for Eclipse on the PC and I am able to log into the WebLogic Server Administration Console
    and set up a Data Source.  However the next step is to create tables for the database.  The book says that the tables can be created using
    SQL script run from the SQL command line.
    I cannot see any way of inputting SQL script into the WebLogic Server Admistration Console.  Aslo there is no SQL Command line in DOS.
    Thanks  for your help.
    Brian.

    Sounds like you are to run the scripts provided by a tutorial to create the tables, right?  In that case, you may need to install an Oracle client to connect to your database.  The client is automatically installed with the database, so if you have access to the server that hosts the database, you should be able to run SQLplus from there.
    As far as I know, there is no way to run a script from the Admin Console.  I could be wrong, however.

  • Question about GRANT CREATE TABLE permission

    Hi,
    How can I grant permission to UserA to create tables in UserB/SchemaB. I understand that "CREATE TABLE" will give permission to the user to create tables within its own schema and "CREATE ANY TABLE" will give permission to the user to create tables in ANY schema.
    Is there a command to give CREATE TABLE to specific schema? Please advice ... Thanks!

    Is there a command to give CREATE TABLE to specific schema? Please advice ... Thanks!No but you can create your own solution
    have SCHEMA_B create a procedure, MAKE_SCHEMA_B_TBL, that issues command below
    EXECUTE IMMEDIATE CREATE TABLE ........
    then do as below
    GRANT EXECUTE ON MAKE_SCHEMA_B_TBL TO SCHEMA_A;

  • Facing Many Problems About Creating Directory and an External Table

    Question:
    The weird thing is if you look at question 10-b in page 3-41, it says:
    (page 3-41 "Oracle Database 10g SQL Fund. II Vol.1")
    Merge the data in the EMP_DATA table created in the last lab into the data in the emp_hist table. Assume
    that the data in external EMP_DATA table matches the EMP_HIST table, update the email column
    of the EMP_HIST table to match the EMP_DATA table row. If a row in the EMP_DATA table does not
    match, insert into the EMP_HIST tables. Rows are considered matching when the employee's first and
    last name are identical.
    To me, this question is constructed wrongly. First of all in the last lab we have not been asked to create EMP_DATA. Secondly, EMP_DATA is empty.
    Thirdly, this question asks us to merge into EMP_HIST table while EMP_DATA is empty.
    EMP_HIST table currently has copied data from employees table. EMP_HIST structure:
    FIRST_NAME VARCHAR2(20)
    LAST_NAME NOT NULL VARCHAR2(25)
    EMAIL NOT NULL VARCHAR2(45)
    Anway, i did the merge as following:
    merge into emp_hist e
    using emp_data d
    on (e.first_name = d.first_name)
    when matched then
    update set
    e.last_name = d.last_name,
    e.email = d.email
    when not matched then
    insert values (d.first_name, d.last_name, d.email);
    I get this error:
    Error report:
    SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file emp.dat in EMP_DIR not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    29913. 00000 - "error in executing %s callout"
    *Cause:    The execution of the specified callout caused an error.
    *Action:   Examine the error messages take appropriate action.
    On the other hand, i said let me try this:
    merge into emp_data d
    using emp_hist e
    on (d.first_name = e.first_name)
    when matched then
    update set
    d.last_name = e.last_name,
    d.email = e.email
    when not matched then
    insert values (e.first_name, e.last_name, e.email);
    I get this error because external table is final once its created as far as i know:
    Error report:
    SQL Error: ORA-30657: operation not supported on external organized table
    30657.0000 - "operation not supported on external organized table"
    *Cause:    User attempted on operation on an external table which is
    not supported.
    *Action:   Don't do that!
    I do not know what to do. I did my best, please help.
    Edited by: user11164565 on Jul 27, 2009 2:43 AM

    user11164565 wrote:
    NOTE: I did my best, i did all what i can do, but the problem persists. Please help
    I will mention all the steps i did clearly....
    I gave scott the following grants:
    grant create any directory to scott;
    grant read on directory emp_dir to scott;
    1. Created a directory and its been created successfully:
    create or replace directory emp_dir
    as 'F:\emp_dir';
    Then i did the following just to make sure my directory is recognized:
    SELECT *
    FROM dba_directories;
    I found the drive amongst the results...
    OWNER DIRECTORY_NAME
    DIRECTORY_PATH
    SYS EMP_DIR
    F:\emp_dir
    SYS SUBDIR
    D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\/2002/Sep
    SYS XMLDIR
    D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\
    2. I created an external table emp_data (the script is given by the text book): done successfully
    drop table emp_data;
    CREATE TABLE emp_data
    (first_name VARCHAR2(20)
    ,last_name VARCHAR2(20)
    , email VARCHAR2(30)
    ORGANIZATION EXTERNAL
    TYPE oracle_loader
    DEFAULT DIRECTORY emp_dir
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
    NOBADFILE
    NOLOGFILE
    FIELDS
    ( first_name POSITION ( 1:20) CHAR
    , last_name POSITION (22:41) CHAR
    , email POSITION (43:72) CHAR )
    LOCATION ('emp.dat') ) ;
    3. I went to F:\ drive to see if emp_dir folder exist or not! I did not see it. I checked hidden files, nothing there. Anyway, i ignored it and did step 4.
    <snip>
    "Anyway, I ignored it . . . "
    and hence the rest of your problems. I did not see in the steps you recounted that you acually created a directory ("folder") named "\emp_dir" on your f: drive. Nothing you create within the database will actually create that directory on the OS. Createing a directory in Oracle, createing an external table in Oracle, will only create pointers to objects that Oracle will simply assume actually exists.

  • Is there any way to create table inside cell in sapui5??

    Hello experts,
    How do we create table inside cell in ui5??
    something like this::
    Market Activities
    Other Activities
    Header 1
    Header 2
    Header 1
    Header 2
    Header 3
    Header 1
    Header 2
    Header 3
    Then how do we go about binding??
    Thank you,
    Best Regards
    Chetna

    This code is actually for simple table which i have created:
    var dvrData = [
                                   {DealerNo:"",checkedOrd:{checked:false,enabled:false},checkedOrd1:{checked:false,enabled:false},checkedColl:  {checked:false,enabled:false},checkedPromos:{checked :false,enabled:false},
    var newDvrTable = new sap.ui.table.Table({
                         id:"newDvrTableId",
                         visibleRowCount: 1,
                        selectionMode: sap.ui.table.SelectionMode.Single
    //following field comes unser first column (with blank label)
    newDvrTable.addColumn(new sap.ui.table.Column({
    label: new sap.ui.commons.Label({text: " Dealer Code", wrapping : true}),
                         template: new NewTextField({
                               id:"dlrNum",
                               value: "{DealerNo}" ,
    // following columns come under "MARKET ACTIVITIES"
      newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "SHOP ACTIVITY",
                         label: new sap.ui.commons.Label({id:"shopId",text: "SHOP",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
                                      enabled: "{checkedOrd/enabled}",
                                      checked:"{checkedOrd/checked}",
    newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "Order Related ACTIVITY",
                         label: new sap.ui.commons.Label({id:"shopId",text: "ORDER",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
                                      enabled: "{checkedOrd1/enabled}",
                                      checked:"{checkedOrd1/checked}",
    //Following two columns must come under Other Activities Column
    newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "CHEQUE COLLECTION",
                         label: new sap.ui.commons.Label({id:"shopId",text: "COLLECTION",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
                                         enabled: "{checkedColl/enabled}",
                                           checked:"{checkedColl/checked}",
    newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "SCHEME UPDATE",
                         label: new sap.ui.commons.Label({id:"shopId",text: "SCHEME UPDATE",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
    enabled: "{checkedPromos/enabled}",
                                      checked:"{checkedPromos/checked}",
      var oModel = new sap.ui.model.json.JSONModel();
                  oModel.setData(dvrData);
    var newdata = oModel.getData();
    sap.ui.getCore().setModel(oModel,"newDvr");
                  newDvrTable.setModel(oModel);
                  newDvrTable.bindRows("/");
    Thank you,
    Best Regards,
    Chetna

  • Create table cause TT6003

    Hi Chirs
    Recently we found this error in JAVA below, as per my understanding, a create operation is holding X lock on table SYS.TABLES for at least 30s, this cause another query operation requering IS lock on table SYS.TABLES is waiting for more than 30s and lead to TT6003 at last.
    But I still have some problems about this error:
    1. Create table operation normally should be very shot, how it hold the X lock on table SYS.TABLES for serveral seconds.
    2. The error indicates query table operation also need locks on table SYS.TABLES. I understand create table needs lock on SYS.TABLES before updating information on it, but query table also need lock (IS lock) on SYS.TABLES? Query table no need to require lock  as I thought.
    3. How can we create table correctly to avoid TT6003?
    Thank you in advance!
    java error:
    2014-10-23 16:41:25.920 [ajp-bio-10002-exec-2] INFO  webstore - 1414053654227_4289_300174投放异常
    org.springside.modules.service.ServiceException: 异常
    ### Error querying database.  Cause: java.sql.SQLException: [TimesTen][TimesTen 11.2.2.6.0 ODBC Driver][TimesTen]TT6003: Lock request denied because of time-out
    Details: LockWait[30000ms] Tran 37.108 (pid 16637) wants IS lock on table SYS.TABLES. But tran 19.1078876 (pid 14894) has it in X (request was X). Holder SQL (create table PLATWD_SZTQ_TQXC
                      zctfrwid VARCHAR2(20) not null,
                      lasttime DATE not
    null...) -- file "lockMgr.c", lineno 9410, procedure "sbLockENQandCheckTbl()"
    ### The error may exist in file [/opt/tompolicy/webapps/ROOT/WEB-INF/classes/mybatis/BestPlatPolicyMapperTimesten.xml]
    ### The error may involve cn.vetech.platpolicy.dao.PlatpolicyMybatisDao.getBestByPlatWd
    ### The error occurred while executing a query
    ### SQL: select * from (    select * from PLATWD_SZHZHK_TAOB where zctfrwid=? and zt=1  and code > ?  order by code    ) where 15000 >= rownum
    ### Cause: java.sql.SQLException: [TimesTen][TimesTen 11.2.2.6.0 ODBC Driver][TimesTen]TT6003: Lock request denied because of time-out
    Regards
    Li

    Hi Chris
    Here is the sys.odbc.ini for your reference.
    [timesten@policies info]$ cat sys.odbc.ini
    [ODBC Data Sources]
    TT_1122=TimesTen 11.2.2 Driver
    [TT_1122]
    Driver=/opt/TimesTen/tt1122/lib/libtten.so
    DataStore=/opt/TimesTen/tt1122/info/TT_1122
    DatabaseCharacterSet=ZHS16GBK
    ConnectionCharacterSet=ZHS16GBK
    PermSize=60000
    TempSize=8000
    OracleNetServiceName=vedb
    Connections=300
    LogFileSize=128
    LogBufMB=128
    LockWait=30
    [ODBC Data Sources]
    tt_1122_c=TimesTen 11.2.2 Client Driver
    [tt_1122_c]
    TTC_SERVER=tt_1122_c_s
    TTC_SERVER_DSN=tt_1122
    As to the full text of the CREATE TABLE, I haven't get it from the programmer, will update to you latter.
    We sometimes create/truncate table,seldom drop table.
    Thanks
    Li

  • How to create table in bisystem

    hi,
    how to create table in bi system.
    My requirement is such like that i want to store data which is used in the routine.
    i want to maintain the data dynamically so that i want to create the table.

    Hi.........
    Same as ABAP only...........using SE11........
    Steps for creating table:.
    There are two approach in creating a table.
    1. Bottom-up approach
    2. Top-down approach. 
    Both are valid and you can choose which approach is suitable for you.  I always use the bottom-up approach. Here are the steps to create the tables with this approach.
    1. SE11 will take you to the DDIC and enter the name of the new table to be created. Let us say Zname. Click create.
    2. Enter the short discription of the table and enter the field of the table.  If it is primary key and you have to check the box. 
    3. Enter the data element  and double click it, you will be asked to save and will take you to data element discription page.  Enter the short discription of the data element and enter the information of domain like the length of field and type of field.
    4. If you wanted to use the existing domain then its fine, or else, you have to create one.  Enter the domain name in the data element page and double click it.  Page will ask to save and jump to domain creation page.
    5. In the domain page, you have to save the information which you have already given in the data elements page and check it.  Before going to data element page, you have to activate the domain.
    6. Go to data element page and save, check and activate.
    7. Go to main table page and save, check, and activate.  
    8. Also, you have to save the technical settings of the table.
    The table is now ready for operation. You can use it in your program or you can use it to enter information.
    Check table:  It is the table which will have all the information about the Foreign keys which are the primary keys in the check table.
    It can be created by creating the foreign key from the main table.  Click foreign key in the main table and it will take you to a page which will ask for table name and field to which foreign key relation has to be associated. Enter the information and you can create the check table automatically.
    SM30 is used for maintenance of the table, that is to realease the errors occured during the creation of the table.  
    Hope this helps......
    Regards,
    Debjani..........

  • How to create table in interactive form via Java Web Dynpro

    Hi,
    How to create table in interactive form via Java Web Dynpro ?
    Any online tutorial / example ?
    Thank you.
    Regards,
    Eric

    Hi Eric,
    Just choose the UI element Table from Form Library and drag and drop it on the form. now choose the no. of rows and columns and other settings you want about table from the wizard initiated through this process. This all is what you have to do to create the table. Now to bind it to the fields of the data source bind the individual colums to individual attributes of the node in the datasource.
    Hope it will solve your query.
    Regards,
    Vaibhav Tiwari.

  • About nested tables in oracle 8i

    hello,
    actually i am working with oracle 8.1.5 's nested tables
    concept...
    here is a description of my tables
    create type parameterranges
    parameter_name varchar2(20),
    min_value number(10),
    max_value number(10)
    create type parameter_ran as table of parameterranges
    create table material_details
    mat_type varchar2(20),
    parameter_ranges parameter_ran
    okay...
    now my doubt is how do i place constraints on the nested table fields i.e on min_value etc...(especially NOT NULL
    constraint)
    DOUBT NO 2
    =============
    I have a query to find out the mat_type,partno from material_details table Based on the parameter value and its min_value ,i.e based on some name value pairs which I am achieving as below .
    select m.mat_type,m.partno
    from material_details m,table(m.parameter_ranges) p
    where p.parameter ='THICKNESS' and p.min_value = '1'
    and m.mat_type='STEEL'
    intersect
    select m.mat_type, m.partno
    from material_details m,table(m.parameter_ranges) p
    where p.parameter ='STANDARD' and p.min_value = 'SAE1010'
    and m.mat_type='STEEL';
    Now I want this to be in a cursor..i.e I want to use the same set of rows returned by the above in another query involving another table .
    That is using the multiple mat_type and partno returned from above I want to find out
    Other fields (company,plant) from another table part_details which also has a nested table in it
    How do I go about this???Actually I want to use these in a PLSQL procedure where we can have row by row control of the rows returned ,that is why I want a cursor.......
    could u think about this too...and if possible mail me at my yahoo id ..
    thanx once again
    please reply to my id
    [email protected]
    thanx
    null

    I don't understand exactly your problem. Can you send me a mail which expresses your problem??

  • About Fact Tables and Image Tables

    Not sure, if this is correct forum for Oracle BI 10.x EE, but still
    I couldn't find another forum, quickly, hence posting here.
    Pardon me.
    Here is the main Q's
    I need little help.
    Our company is implementing Oracle BI 10.x. We don't have much experience in Siebel Analytics/OBI.
    We have few fact tables e.g. W_XXXX_F, which we need/wish to extend. We are not sure about which methodology we should implement. When we talked with few SA experts they mentioned we need to extend based on ROW_WID. Well, this column doesn't exists anymore in many fact tables, so currently we are thinking of creating ROW_WID on this F table manually and then create WC_XXXX_FX and take these two tables in physical layer of RPD.
    Additially, we need to create few Informatica mappings, again SA experts pointed out to use Image tables. Our data source is Oracle Applications, I don't have much idea about Image tables, but clearly there is not S_ETL_I_IMGAGe or so tables in Oracle Apps
    Please guide us as how to proceed on these two issues.
    Rajat

    Not sure, if this is correct forum for Oracle BI 10.x EE, but still
    I couldn't find another forum, quickly, hence posting here.
    Pardon me.
    Here is the main Q's
    I need little help.
    Our company is implementing Oracle BI 10.x. We don't have much experience in Siebel Analytics/OBI.
    We have few fact tables e.g. W_XXXX_F, which we need/wish to extend. We are not sure about which methodology we should implement. When we talked with few SA experts they mentioned we need to extend based on ROW_WID. Well, this column doesn't exists anymore in many fact tables, so currently we are thinking of creating ROW_WID on this F table manually and then create WC_XXXX_FX and take these two tables in physical layer of RPD.
    Additially, we need to create few Informatica mappings, again SA experts pointed out to use Image tables. Our data source is Oracle Applications, I don't have much idea about Image tables, but clearly there is not S_ETL_I_IMGAGe or so tables in Oracle Apps
    Please guide us as how to proceed on these two issues.
    Rajat

  • Confused about logical table source

    Hi,
    I'm confused about logical table source(LTS), there are 'General', 'Column Mapping', 'Content' tabs in
    LTS, in General tab ,there are some information,like 'Map to there tables' and 'joins',
    just here, we have created relationships in physical layer and BMM layer, so I would like to ask what's the use of the 'joins' here?

    Hi Alpha,
    Valid query, when you establish a complex join it is always between a logical fact and dimension table.Consider a scenario,
    Example:w_person_dx is an extension table not directly joined to a fact but joins to a dimension w_person_d.
    When you model the person_d tables in BMM, you ll have a single logical table with w_person_d as source.If you have to pull columns from both w_person_d and w_person_dx tables in a report, you add dx table as inner join to persond table in the general tab.Now when you check your physical query, you can see the inner join fired between the two dimensions.
    Rgds,
    Dpka

  • Create Table Temp As Select * from Table

    What happens in the backend (performance point of view) when we create a table as follows:
    Create Table Temp As Select * from Table1;
    Suppose that the table Table1 has 10 million rows.
    How is this different from inserting 10 million rows using Insert Statement in a script etc. into Temp table.
    i.e. insert into temp values(1, 'description', sysdate);

    >
    Create Table Temp As Select * from Table1; is always faster than inserting different rows using insert scripts.
    >
    Incorrect - not sure where you got that information.
    The two things being talked about that can affect performance are the use of direct-path loads and whether those loads are logged.
    It makes no difference if the table is created first and then loaded using INSERT or if a CTAS is used to do both.
    A traditional INSERT can use the APPEND hint to perform a direct-path load.
    >
    Cretae table Temp As select * from Tabl1 does not generate logging to the database.Also as datatypes are determined automatically ,there is less work up front.
    >
    The statement that CTAS 'does not generat logging' is incorrect. Whether logging is generated depends on whether the table is in LOGGING or NOLOGGING mode. A CTAS does not automatically, on its own bypass logging.
    To bypass logging and existing table can be set to NOLOGGING mode
    ALTER TABLE myTable NOLOGGINGAnd for CTAS the mode can be specified as part of the statement
    Create table Temp NOLOGGING As select * from Tabl1;

  • SQL Developer 1.5.1 - warning messages generated by CREATE TABLE

    Hi,
    Have an issue with a CREATE TABLE statement - it works correctly, but generates a warning message when used in SQL Developer (1.2 or 1.5.1). Full test case below:
    Setup:
    drop table samplenames;
    drop table customers;
    drop table phones;
    drop table customers_phone;
    drop sequence primkey;
    create table samplenames
    (name VARCHAR2(10));
    insert into samplenames values ('dan');
    insert into samplenames values ('joe');
    insert into samplenames values ('bob');
    insert into samplenames values ('sam');
    insert into samplenames values ('weslington');
    insert into samplenames values ('sue');
    insert into samplenames values ('ann');
    insert into samplenames values ('mary');
    insert into samplenames values ('pam');
    insert into samplenames values ('lucy');
    create sequence primkey
    start with 1000000
    increment by 1;
    create table customers as
    select primkey.nextval as cust_id,
    tmp1.name || tmp2.name as first_name,
    tmp3.name || tmp4.name || tmp5.name as last_name
    from samplenames tmp1,
    samplenames tmp2,
    samplenames tmp3,
    samplenames tmp4,
    samplenames tmp5;
    CREATE TABLE PHONES AS
    SELECT cust_id, 'H' as phn_loc, trunc(dbms_random.value(100,999)) as area_cde,
    trunc(dbms_random.value(1000000,9999999)) as phn_num
    FROM customers;
    INSERT INTO PHONES
    SELECT cust_id, 'B' as phn_loc, trunc(dbms_random.value(100,999)) as area_cde,
    trunc(dbms_random.value(1000000,9999999)) as phn_num
    FROM customers;
    --randomly delete ~10% of records to make sure nulls are handled correctly.
    delete from phones
    where MOD(area_cde + phn_num, 10) = 0;
    create table statement (there are legacy reasons for why this is written the way it is):
    CREATE TABLE customers_phone NOLOGGING AS
    SELECT cst.*,
    piv.HOME_PHONE,
    piv.WORK_PHONE
    FROM (SELECT cust_id,
    MAX(decode(phn_loc, 'H', '(' || area_cde || ') ' ||
    substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS HOME_PHONE,
    MAX(decode(phn_loc, 'B', '(' || area_cde || ') ' ||
    substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS WORK_PHONE
    FROM phones phn
    WHERE phn_loc IN ('H', 'B')
    AND cust_id IS NOT NULL
    AND EXISTS (SELECT NULL
    FROM customers
    WHERE cust_id = phn.cust_id)
    GROUP BY cust_id) piv,
    customers cst
    WHERE cst.cust_id = piv.cust_id (+)
    Warning message output:
    "Error starting at line 1 in command:
    CREATE TABLE customers_phone NOLOGGING AS
    SELECT cst.*,
    piv.HOME_PHONE,
    piv.WORK_PHONE
    FROM (SELECT cust_id,
    MAX(decode(phn_loc, 'H', '(' || area_cde || ') ' || substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS HOME_PHONE,
    MAX(decode(phn_loc, 'B', '(' || area_cde || ') ' || substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS WORK_PHONE
    FROM phones phn
    WHERE phn_loc IN ('H', 'B')
    AND cust_id IS NOT NULL
    AND EXISTS (SELECT NULL
    FROM customers
    WHERE cust_id = phn.cust_id)
    GROUP BY cust_id) piv,
    customers cst
    WHERE cst.cust_id = piv.cust_id (+)
    Error report:
    SQL Command: CREATE TABLE
    Failed: Warning: execution completed with warning"
    I am on 10.2.0.3. The CREATE TABLE always completes successfully, but the warning bugs me, and I have had no success tracking it down since there is no associated numberr.
    Anyone have any ideas?

    Hi ,
    The Oracle JDBC driver is returning this warning so I will be logging an issue with them, but for the moment SQL Developer will continue to report the warning as is.
    The reason for the warning is not clear or documented as far as I can tell,
    but I have replicated the issue with a simpler testcase which makes it easier to have a guess about the issue :)
    ----START
    DROP TABLE sourcetable ;
    CREATE TABLE sourcetable(col1 char);
    INSERT INTO sourcetable VALUES('M');
    DROP TABLE customers_phone;
    CREATE TABLE customers_phone AS
    SELECT MAX(decode(col1, 'm','OK' , NULL)) COLALIAS
    FROM sourcetable;
    ----END
    The warning occurs in the above script in SQL Developer , but not in SQL*Plus.
    The warning disappears when we change 'm' to 'M'.
    The warning disappears when we change NULL to 'OK2'
    In all cases the table creates successfully and the appropriate values inserted.
    My gut feeling is ...
    During the definition of customers_phone, Oracle has to work out what the COLALIAS datatype is.
    When it sees NULL as the only alternative (as sourcetable.col1 = 'M' not 'm') it throws up a warning. It then has to rely on the 'OK' value to define the COLALIAS datatype, even though the 'OK' value wont be inserted as sourcetable.col1 = 'M' and not 'm'. So Oracle makes the correct decision to define the COLALIAS as VARCHAR2(2), but the warning is just to say it had to use the alternative value to define the column.
    Why SQL*Plus does not report it and JDBC does, I'm not sure. Either way it doesn't look like a real issue.
    Again, this is just a guess and not a fact.
    Just though an update was in order.
    Regards,
    Dermot.

Maybe you are looking for

  • Error when trying to open new query from Bex

    Hi guys, I m trying to open query designer from Bex explorer and i get the following error: The macro 'sapbex.xla!reponewquery'cannot be found. Can anyone please tell me how to rectify this? thanks in advance

  • How to read chinese and keep azerty keyboard (for ...

    I m bored to be not abble to read all the messages that i received in chinese. I canot change for the chinese soft coz i won t have azerty keyboard (i need it) How to be CONNECTED with others PEOPLE ???????

  • Finder does not show all files from NAS

    Hi there I have a NAS attached to my mini where music, ... is stored. I can access it from both the mac as well as a PC. for some reason the mac finder does not display all the files in the directory even though the files are there (i can see and ope

  • IPhoto still tells me to download upgrader

    I've downloaded and installed the iPhoto Library Upgrader, but when I try to open iPhoto, it still tells me I need to download and install it.

  • Osx lion slow on macbook pro early 2008

    i upgraded the day it came out and my mcbkpro is so slow recently its not even funny i need help also having problems printing from preview i get the stupid rainbow wheel its so frustrating