Use Table Name in Summary Table

Hi,
I am looking for a way to use the names of tables in another table.
eq. I have tables named after the months. And I want to use this name in another table in which i summarize all the facts from the mont tables. Is there a way to refer to the table name?
Thanks in Advance Paul

Hi Jerrold
It seems that we made the same interpretation.
I just wished to give a soluce allowing the user to change easily the name of the referenced table.
In my sample, if I add a new table, the required task is just to add it's name in the first column and replicate the original formula with no change.
For a single formula, it changes quite nothing but if we use many cells, it's an efficient time saving.
I just gave a really bare example.
Here is one with more referenced cells.
Don't worry, the separator is semi-colon because I ran Numbers in English on my French system
Yvan KOENIG (VALLAURIS, France.) mardi 11 août 2009 17:19:46

Similar Messages

  • Automatic Row Processing (DML) using synonym name instead of table

    I want my APEX form to select info using the table name but perform all the DML (add, change, delete) using the synonym name. I created the form using the wizard and went into the "Process Row of xxx" process that was created. I tried changing the table name to synonym name under the 'Source: Automatic Row Processing (DML)' section, but it still uses the table name. Is this possible or do I need to manually create processes using the synonym names

    Hi,
    when I change the Table Name property in the "Automatic Row Processing (DML)" process to a non existing table it raises an error when I run the page and try to save something. So it's actually using the value.
    Does the synonym point to the same table or a different table? What is the intention behind selecting from the table but updating through the synonym?
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com/
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/
    The ApexLib Framework: http://apexlib.sourceforge.net/

  • Can you use schema name in "INTO TABLE" in sqlldr?

    Hi All,
    I have a simple question.
    My Oracle userid is SBHAT.
    SBHAT has insert,delete, select,update privileges on a Table in another schema XYZ.
    I want to SQL*Load data in Table EMPLOYEE in XYZ schema, using my userid. Something like ....
    sqlldr userid=*SBHAT*/password control=test.ctl data=test.txt
    I tried to use the following in my test.ctl file but it does not work.
    load data
    append
    into table "XYZ.EMPLOYEE"
    fields terminated by ',' optionally enclosed by '"'
    trailing nullcols
    Can someone give me the proper syntax for into table that uses *schema.table_name* construct.
    Thanks,
    Suresh

    Pl post exact OS and database versions - what do you get when you execute sql*loader with the syntax you have identified so far ?
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_control_file.htm#i1005623
    HTH
    Srini

  • Need a that Table Name in Select command which being used in from statement

    My Question Is:
    If my SQL command is like this "
    Select Code, Name from Customer (Table Name)
    Can I get this output in this Way .. ?
    Select Code, Name,Customer(Table Name)  from Customer (Table Name)
    in dynamic way ..

    NO. You missing many fundamental concepts of RDBMS. A table is a set of entities, so it's name is plural or collective(unless you really do have only one customer as you said). There is no such thing as a generic "name", or "code" in RDBMS. Those affixes
    are called attribute properties, and they have to be part of an attribute data element name -- customer_name, postal_code, etc. 
    Since a table is a set, its columns are fixed and known in the schema. They do not change by magic! This kind of non-RDBMS thinking is called "Automobiles, Squids and Lady GaGa" coding. Please read any intro book on RDBMS. Your whole mindset is wrong. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Summary Tables Questions...

    Hi to everybody,
    I use Oracle Discoverer 10.1.2 and created some summary tables - using both methods : being specified by me and Discover automatically defined them....
    I have two questions:
    1) Is there any way to define the summary table(materialized view in the 'language' of Oracle Database ) in the application db user and not in the Discoverer Repository db owner.....????
    NOTE: I have created the Discoverer Repository in a user , let's say EUL, whereas all referenced tables in the summary tables are owned in another user , say HIS...
    Simply , I ask if a summary table can be created in the HIS dataschema and not in EUL.....
    2)Is there any way to give the summary table a more meaningful name in the process of creating it..... I mean a name different from this one: EUL5_MV102497
    Thanks , a lot
    Simon

    Hi Simon
    As mentioned by Sabine, if you create the materialized views in the database you have full control. To answer your question I always build my summary tables in the schema of the user who owns the EUL.
    However, I would have thought that you can do what you ask, but I'm not so sure. In theory, all you need to do in order to make this work is to make sure the EUL owner and the owner of the schema into where you want to insert the summary table has the following privileges:
    These are the grants the EUL needs:
    ALTER ANY MATERIALIZED VIEW
    CREATE ANY MATERIALIZED VIEW
    DROP ANY MATERIALIZED VIEW
    ANALYZE ANY
    These are the privileges needed by the user in whose schema you intend to create the materialized view:
    CONNECT
    RESOURCE
    GLOBAL QUERY REWRITE
    With these privileges granted you should be able to create summary tables inside Discoverer and have full control over the schema in which the materialized view is created and the name of the materialized view. I say should be able to because it doesn't seem to work. Please read on.
    To control the MV schema and name, I should be able to use this workflow:
    1. When you are in the manual summary folder process, you will come to a screen that allows you to maintain Combinations.
    2. From the Combinations screen, highlight a combination and click the Properties button.
    3. The Database Storage Properties dialog box will open.
    4. In the Database Storage Properties dialog box, use the drop-down alongside the Table Owner and switch this to be a user who has the privileges mentioned earlier.
    Note: the drop-down is not visible until you click in the Table Owner box
    5. Click in Table Name (this is the name of the materialized view) and change it to a name that complies with your naming standards.
    6.Change any other properties you wish, then click OK.
    7. Click Finish to complete the summary folder.
    At this point, even though I had granted the Global Query Rewrite to the other user, Discoverer Admin stopped and reported that the user needed this privilege. I was therefore unable to complete the summary folder process. Interestingly enough, the materialized view was actually created but I, as the owner of the EUL, was unable to use it. This is because in order for the EUL owner to be able to use an existing MV / Table that is owned by someone else, the other user needs to have run a grant like this:
    GRANT SELECT ON MY_MV TO EUL_OWNER WITH GRANT OPTION
    But how can this be done because the table is being created by me? The problem therefore is that only the owner of the MV can grant this but when you are inside Discoverer Admin you are not logged in as that user. I therefore am suspicious that, despite Discoverer having a screen to do so, it is not possible to create a summary table in someone else's account.
    Has anyone been able to make this work?
    In summary though, if the intention is to produce a materialized view that everyone can use then the above doesn't appear to work. However, it looks like you are able to create a materialized view within a user's schema that is only available to that user. This opens up the interesting possibility that you could create different materialized views for different users, thus giving users individual copies and potentially different copies of the data.
    It would be interesting if someone were to test this out and report back. My only concern would be that once created, because it is the EUL owner who has the ALTER and DROP privileges, how would the schema owner update it? As I say, this is an interesting conumdrum.
    Personally, as stated at the beginning, I always create my summary folders (aka materialized views) in the EUL owner's schema.
    I hope this helps
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • Is it possible to change Overridden Qualified Table Name in code?

    Hi,
    Environment: Crystal Reports XI R2, 2008, Sql Server 2005
    I had about 1000 reports to change. Several changes are the standard, so i had created several tools that i use to make that change in all reports.
    However i can't find a way to change Overridden Qualified Table Name and remove the Catalog and Owner information, so it seems that the only way is using CR editor and make these changes one by one... not a good idea!
    Does anyone managed to do this???
    Thanks,
    Carlos Crespo

    Hi,
    <P>Thanks for your input.</P>
    <P>I use CR in two ways:<BR>
    a) to develop reports to use in our projects - In this case we don't have major issues with this, and we chance the location of the database in code at runtime;<BR>
    b) to develop reports to use in ERP softwares from third parties - and here we are having some issues - not always but some times.<BR>
    We know that they change the location of the DB in code also (no specific info however).<BR>
    <P>An example:<P>
    We change a report on my development PC, against a DB called TEST;<BR>
    We send the report to the customer, who runs it on its system, trying to read data from a db XYZ;<BR>
    If the customer also has a TEST db, in some reports the system reads some tables from XYZ, but others he gets the info from TEST db. In one example our customer has an invoice where all data was from the production DB, except the COUNTRY table that was read from a copy of the TEST db. After TEST was removed, the data was read from the production DB....<BR><BR>
    And to get you an idea: we're talking about hundreds of customers - some of them have 600 SQL DBs in the same server (small Dbs, around 70/500 MB in size) - so we can only hope that the user doesn't create a DB with the same name we used to develop the report...<BR><BR>
    And what i don't understand is WHY we can define Overridden Qualified Table Name  in same tables, and not in others.<BR><BR>
    Example:<BR><BR>
    One of the reports has 6 sub-reports. <BR>
    I can define Overridden Qualified Table Name  in the main report (except for a View), and in 2 of the subreports - but not in the other 4...<BR>
    The zero in front of the table name shows  a table where Overridden Qualified Table Name has been defined, and the original Catalog and Owner was removed - the 2 shows a table where Overridden Qualified Table Name has been defined, but the original catalog (PRITESTEDOC75) and owner (dbo) remains.<BR><BR>
    I even tried to export the sub-reports, change this info in the sub-report, and then import it again (a suggestion from Business Object support), but it doesn't work...<BR><BR>
    Main Report:<BR>
    Artigo     0     <BR>     
    CabecDoc     0     <BR>     
    LinhasDoc     0     <BR>     
    ModosExp     0          <BR>
    Clientes     0          <BR>
    CondPag     0          <BR>
    DocumentosVenda     0     <BR>     
    Moedas     0          <BR>
    MoradasAlternativasClientes     0     <BR>     
    OutrosTerceiros     0<BR>          
    ArtigoIdioma     0          <BR>
    Paises     0          <BR>
    ArtigoLote     0     <BR>     
    TDU_CC_INFODOCVND     0     <BR>     
    Clientes_Fac     0     <BR>     
    Paises_Fac     0          <BR>
    V_Entidades     2     PRITESTEDOC75     dbo        (V_Entidades is a View, not a Table)<BR><BR>
    Sub-Report 1:<BR>
    GCP_VND_CalculaTotaisDocumento     2     PRITESTEDOC75     dbo (GCP_VND_CalculaTotaisDocumento is a SP)<BR><BR>
    Sub-Report 2:<BR>
    CnfTabLigCBL     2     PRITESTEDOC75     dbo<BR><BR>
    Sub-Report 3:<BR>
    LinhasNumSerie     2     PRITESTEDOC75     dbo<BR><BR>
    Sub-Report 4:<BR>
    ResumoRetencao     0          <BR>
    Historico     0          <BR>
    OutrosTerceiros     0          <BR>
    EntidadesPublicas     0          <BR>
    Clientes     0          <BR><BR>
    Sub-Report 5:<BR>
    1 ResumoRetencao     0     <BR>     
    2 Historico     0          <BR>
    3 OutrosTerceiros     0          <BR>
    4 EntidadesPublicas     0     <BR>     
    5 Clientes     0     <BR><BR>
    Sub-Report 6:     <BR>
    1 ResumoIva     2     PRITESTEDOC75     dbo<BR>
    2 CabecDoc     2     PRITESTEDOC75     dbo<BR>
    3 Iva     2     PRITESTEDOC75     dbo<BR><BR>
    Best Regards,<BR><BR>
    Carlos Crespo<BR>

  • Batch reading request doesn't prefix field names by table name

    A batch reading request doesn't prefix field names by table name and I've got a AmbigiousException which is normal because there is the same fields in the 2 tables.
    The following code :
    //call a ReadAllQuery and return a list of AffaireImpl
    List<Affaire> listeAffaire =  affaireDao.getAffaireCorrespondantes(lccJrd, lnaAnnee, lnaOrdre, lcNataffCode, lnaNoSuite);
    for (Affaire affaire : listeAffaire) {
       //there is a one to Many mapping on Affaire to Dossier, with Transparent Indirection, Read-Ony and Batch Reading
       //this metod generate the wrong batch reading method
       List<Dossier> listeDossiers = affaire.getDossier();
    generates the following requests:
    ReadAllQuery(eu.curia.litige.model.AffaireImpl) --
    SELECT * FROM LA_AFF WHERE ( ((LCC_JRD = 'C') AND (LNA_ANNEE = 8)) AND (LNA_ORDRE = 8))
    ReadAllQuery(eu.curia.litige.model.DossierImpl) --
    SELECT t0.*
    FROM LA_DOSSIER t0, LA_AFF t1
    WHERE
    (((t0.LNA_NO_SUITE = t1.LNA_NO_SUITE) AND ((t0.LCC_JRD = t1.LCC_JRD) AND ((t0.LC_NATAFF_CODE = t1.LC_NATAFF_CODE) AND ((t0.LNA_ANNEE = t1.LNA_ANNEE) AND (t0.LNA_ORDRE = t1.LNA_ORDRE)))))
    AND UPPER(LCC_JRD) = 'C' AND UPPER(LNA_ORDRE) = '8' AND UPPER(LNA_ANNEE) = '8')+
    but the request should be :
    SELECT t0.*
    FROM LA_DOSSIER t0, LA_AFF t1
    WHERE
    (((t0.LNA_NO_SUITE = t1.LNA_NO_SUITE) AND ((t0.LCC_JRD = t1.LCC_JRD) AND ((t0.LC_NATAFF_CODE = t1.LC_NATAFF_CODE) AND ((t0.LNA_ANNEE = t1.LNA_ANNEE) AND (t0.LNA_ORDRE = t1.LNA_ORDRE)))))
    AND t1.LCC_JRD = 'C' AND t1.LNA_ORDRE = '8' AND t1.LNA_ANNEE = '8')+
    It's strange because this is the only place the batch reading doesn't prefix and uses a UPPER.
    For now we have disabled the batch reading, but it decreases the performanes (the list of affaire can be hudge).
    Any Idea?
    We use TopLink 10.1.3 on a Oracle 10g Database.
    Edited by: krampstudio on 2 déc. 2011 07:40
    Edited by: krampstudio on Dec 7, 2011 11:57 AM

    Here the mapping (I've also remove the tags of some of the direct mapping fields to simplify the reading)
         <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
             <opm:class>eu.curia.litige.model.AffaireImpl</opm:class>
             <opm:alias>Affaire</opm:alias>
             <opm:primary-key>
                <opm:field table="LA_AFF" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LCC_JRD" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LNA_ANNEE" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LNA_ORDRE" xsi:type="opm:column"/>
             </opm:primary-key>
             <opm:events xsi:type="toplink:event-policy"/>
             <opm:querying xsi:type="toplink:query-policy">
                <toplink:does-exist-query xsi:type="toplink:does-exist-query">
                   <toplink:existence-check>check-database</toplink:existence-check>
                </toplink:does-exist-query>
             </opm:querying>
             <opm:attribute-mappings>
                <opm:attribute-mapping xsi:type="toplink:one-to-many-mapping">
                   <opm:attribute-name>dossier</opm:attribute-name>
                   <opm:read-only>true</opm:read-only>
                   <opm:get-method>getDossier</opm:get-method>
                   <opm:set-method>setDossier</opm:set-method>
                   <opm:reference-class>eu.curia.litige.model.DossierImpl</opm:reference-class>
                   <opm:target-foreign-key>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LCC_JRD" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LCC_JRD" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LNA_ANNEE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LNA_ANNEE" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LNA_ORDRE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LNA_ORDRE" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                      </opm:field-reference>
                   </opm:target-foreign-key>
                   <toplink:batch-reading>true</toplink:batch-reading>
                   <toplink:container xsi:type="toplink:list-container-policy">
                      <toplink:collection-type>oracle.toplink.indirection.IndirectList</toplink:collection-type>
                   </toplink:container>
                   <toplink:indirection xsi:type="toplink:transparent-collection-indirection-policy"/>
                   <toplink:selection-query xsi:type="toplink:read-all-query">
                      <toplink:container xsi:type="toplink:list-container-policy">
                         <toplink:collection-type>oracle.toplink.indirection.IndirectList</toplink:collection-type>
                      </toplink:container>
                   </toplink:selection-query>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lccJrd</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LCC_JRD" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lcNataffCode</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lnaAnnee</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LNA_ANNEE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lnaNoSuite</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lnaOrdre</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LNA_ORDRE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
             </opm:attribute-mappings>
             <toplink:descriptor-type>independent</toplink:descriptor-type>
             <toplink:caching>
                <toplink:cache-invalidation-policy xsi:type="toplink:time-to-live-cache-invalidation-policy">
                   <toplink:time-to-live>30000</toplink:time-to-live>
                </toplink:cache-invalidation-policy>
             </toplink:caching>
             <toplink:instantiation/>
             <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
             <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
             <toplink:tables>
                <toplink:table name="LA_AFF"/>
             </toplink:tables>
          </opm:class-mapping-descriptor>

  • Issue with determing table name runtime

    Hi All,
    I have a problem in determing the table name during runtime
    TABLES : ekko.
    DATA : test TYPE REF TO lcl_test.
    DATA : itab TYPE STANDARD TABLE OF ekko.
    IF test IS INITIAL.
        CREATE OBJECT test.
      ENDIF.
    test->cmeth( EXPORTING itab1 = itab ).
    CLASS lcl_test DEFINITION.
      PUBLIC SECTION.
        METHODS : cmeth IMPORTING itab1 TYPE STANDARD TABLE.
    ENDCLASS.                   
    *       CLASS lcl_test IMPLEMENTATION
    CLASS lcl_test IMPLEMENTATION.
    METHOD test.
    *Here i have to know the table name of the importing internal data itab1 (In this particular case its EKKO)
    *In general it can be any table
    *Is there a way to determine a table name (as EKKO) in this method
    *My problem is i need to find out the field of that internal table
    *to find out the fields of the  table i'm using
    CALL FUNCTION 'GET_COMPONENT_LIST'
    EXPORTING
    program = sy-repid
    fieldname = 'I need to pass header of the internal table something like wa_ekko'
    TABLES
    components = icomp.
    ** so i have to find out the table name and declare a work area and then pass that to Get_component_list FM*
    OR
    I CAN USE BELOW CODE AS WELL
    data:
        wa_ref        type ref to data,
        desc_table    type ref to cl_abap_tabledescr,
        desc_struc    type ref to cl_abap_structdescr.
      field-symbols:
        <p_data>      type any,
        <p_field>     type any,
        <p_component> type abap_compdescr.
    ** The probelm  here is it_data has s tructure defined in class unlike mine  with is type standard table*
    create data wa_ref like line of it_data.
      assign wa_ref->* to <p_data>.
    desc_table ?= cl_abap_tabledescr=>describe_by_data( it_data ).
      desc_struc ?= desc_table->get_table_line_type( ).
    loop at it_data assigning <p_data>.
        loop at desc_struc->components assigning <p_component>.
            assign component <p_component>-name of structure <p_data> to <p_field>.
        endloop.
      endloop.
    endmethod.
    Hope i'm clear
    Thanks
    David

    Hi
    Perhaps something like this can help you:
    TABLES : EKKO.
    DATA : ITAB TYPE STANDARD TABLE OF EKKO.
    CLASS LCL_TEST DEFINITION.
      PUBLIC SECTION.
        METHODS : CMETH IMPORTING ITAB1 TYPE STANDARD TABLE.
    ENDCLASS.                    "lcl_test DEFINITION
    CLASS LCL_TEST IMPLEMENTATION.
      METHOD CMETH.
        DATA: MY_WA       TYPE REF TO DATA.
        DATA: DESC_TABLE    TYPE REF TO CL_ABAP_TABLEDESCR,
              DESC_STRUC    TYPE REF TO CL_ABAP_STRUCTDESCR.
        FIELD-SYMBOLS:
             <P_DATA>      TYPE ANY,
             <P_FIELD>     TYPE ANY,
             <P_COMPONENT> TYPE ABAP_COMPDESCR.
        CREATE DATA MY_WA LIKE LINE OF ITAB1.
        ASSIGN MY_WA->* TO <P_DATA>.
        DESC_STRUC ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( <P_DATA> ).
        LOOP AT DESC_STRUC->COMPONENTS ASSIGNING <P_COMPONENT>.
          WRITE: / <P_COMPONENT>-NAME.
        ENDLOOP.
      ENDMETHOD.                    "test
    ENDCLASS.                    "lcl_test IMPLEMENTATION
    DATA : TEST TYPE REF TO LCL_TEST.
    START-OF-SELECTION.
      IF TEST IS INITIAL.
        CREATE OBJECT TEST.
      ENDIF.
      TEST->CMETH( EXPORTING ITAB1 = ITAB ).
    Max

  • What to do when a table name is a reserved word?

    I know the best answer is not to use a reserved word to name a table. But I have no control over that in this situation. I have read that using all Caps and quotations will allow you to use the table name in queries, i.e. "CATEGORY" is suppose to free the table to be used. But that is certainly not working, nor any variation of that formatting.
    Does anyone know how to format a reserved word to allow queries?
    Thank You

    Use double quotes:
    SQL> create table ALTER (a number);
    create table ALTER (a number)
    ERROR at line 1:
    ORA-00903: invalid table name
    SQL> create table "ALTER" (a number);
    Table created.
    SQL> desc alter
    ERROR:
    ORA-00931: missing identifier
    SQL> desc "ALTER"
    Name                                      Null?    Type
    A                                                  NUMBER
    SQL> insert into "ALTER"
      2  select level from dual connect by level<=10;
    10 rows created.
    SQL> select * from "ALTER";
             A
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.BTW CATEGORY is not a reserved word:
    SQL> create table category (a number);
    Table created.Max
    http://oracleitalia.wordpress.com
    Edited by: Massimo Ruocchio on Feb 25, 2010 12:32 AM

  • How make table name 3 lines instead of one

    I figured out how to add a title to a table, but cannot make the title in two or more rows, only one. How can I create table name with three rows. I hope someone can answer this question and also tell me how to do the same thing before putting data in the table, if that method is different. Thanks in advance

    EH,
    To emphasize a point SG is making: Title and Name have specific meanings with respect to Tables.
    The table name should be as concise as possible, and ideally you should think of something more creative than Table 1 so that it means something down the road. Concise because the name will be used in any formula referencing one table from another. Meaningful because it will help you to get your equations working properly if they trigger special associations. There is a checkbox in the Format Pane, Table tab, where you can choose to display the table name above the table, or not.
    Titles are the text applied to Header cells, either in a Header Row or Header Column. These identifiers specify the Fields of the table. The Header text can be used in formulas but is best left as a simple visual cue. There is a Preference in Numbers Preferences, General, where you can choose to use Header text in equations. In my opinion this option is best left off.
    Jerry

  • Problem quoting table names

    Hi,
    I want to use my tables capitalized, but something is not working right. I am using Oracle Database Express Edition 2.1.0.00.39.
    Creating and altering a table as follows works:
    "CREATE TABLE Mitarbeiter (
         MA_ID number NOT NULL,
         ORG_ID number NOT NULL,
         Nachname char(128) NOT NULL,
         Vorname char(128) NOT NULL,
         Geburtsdatum date NOT NULL,
         Kommentar varchar2(100),
         Rang char(3) DEFAULT 'MA' NOT NULL,
         PRIMARY KEY ( MA_ID )
    ALTER TABLE Mitarbeiter ADD CONSTRAINT OrgEinheit FOREIGN KEY ( ORG_ID ) REFERENCES OrgEinheit ( ORG_ID );
    If I quote the table name like
    "CREATE TABLE "Mitarbeiter" (
         MA_ID number NOT NULL,
         ORG_ID number NOT NULL,
         Nachname char(128) NOT NULL,
         Vorname char(128) NOT NULL,
         Geburtsdatum date NOT NULL,
         Kommentar varchar2(100),
         Rang char(3) DEFAULT 'MA' NOT NULL,
         PRIMARY KEY ( MA_ID )
    ALTER TABLE "Mitarbeiter" ADD CONSTRAINT OrgEinheit FOREIGN KEY ( ORG_ID ) REFERENCES OrgEinheit ( ORG_ID );
    the alter statement is not executed successfully. I get the error message "ORA-00942 table or view does not exist".
    Who can help?
    Udo

    Thanks,
    I am not planning to have more headaches,
    everything's fine now. Sorry asking about a selfmade
    problem quoting only part of the table names.
    UdoNo need to apologise, it's a common thing that people don't understand how the database stores object names in UPPER by default and how double quotes (often seen used in SQL generated by 3rd party tools) actually force the case of the names.
    The below example shows how easily confusion could be caused if you start using double quotes...
    SQL> create table mytable (x number);
    Table created.
    SQL> create table "mytable" (x number);
    Table created.
    SQL> create table "MyTable" (x number);
    Table created.
    SQL> select table_name from user_tables where upper(table_name) = 'MYTABLE';
    TABLE_NAME
    MYTABLE
    MyTable
    mytable
    SQL> insert into mytable values (1);
    1 row created.
    SQL> insert into "mytable" values (2);
    1 row created.
    SQL> insert into "MyTable" values (3);
    1 row created.
    SQL> select * from mytable;
             X
             1
    SQL> select * from "mytable";
             X
             2
    SQL> select * from "MyTable";
             X
             3
    SQL>

  • Prefixing the schema owner to the table name

    I have entity objects in my JClient app that were created from tables owned by USER1. When I connect to my JClient app as USER2 the DML fails because the table names are not prefixed by the table owner (USER1). I don't want to use public synonyms and I don't want to customize my view objects just to prefix the table names with the table owner. How could I prefix all of the table names with the table/schema owner by default?

    We have been using another approach. We change the "current schema" at the db session level. This avoids having to define public synonyms and having to fully qualify names. It also allows us to have the same application schema defined multiple times in a db instance, which is useful for testing.
    While our real code is bit more complicated, basically we implement the afterConnect() and prepareSession() methods on an appication module with a call to our utility method:
    protected void afterConnect() {
    super.afterConnect();
    setupSession('hr');
    protected void setupSession(String currentSchema) {
    try {
    log.debug("Setting current schema to: " + currentSchema +
    " via: call alter session set current schema " + currentSchema);
    Statement stmt =
    getDBTransaction().createStatement(DBTransaction.DEFAULT);
    stmt.execute("alter session set current_schema=" + currentSchema);
    stmt.close();
    } catch (SQLException e) {
    if (e.getErrorCode() == 1435) {
    log.info("Couldn't set the current_schema to " + currentSchema +
    " because it doesn't exist in the target db.");
    } else {
    log.error("Error setting current_schema in DB context!", e);
    } catch (Exception e) {
    log.error("Error setting current_schema in DB context!", e);
    }

  • Looping delete statement where table name is coming from another table

    Hi All,
    We have to write code to delete records from active tables of WDSO.We have 5 DSO  so inspite of writing delete statement for each table we want to put all table names into one table and then loop through it .but we are getting error when we are refering that table field which has active table name.error is :
    "dictionary structure or table is either not active or does not exist "
    As per my understanding in a delete /select /insert /update statement we need to put table name (whose field we are refering ) it can't be replaced by a variable .
    ex: v_table = 'EMPLOYEE' .
    DELETE FROMv_table WHERE EMP_NAME = 'ABDC' .
    is wrong and it must be like
    ex : DELETE FROM EMPLOYEE WHERE EMP_NAME = 'ABDC' .
    but we want to make our code dynamic .
    Can you please suggest a way so that we can read the table names from another table and delete data based on some selection fom those tables .
    I tried variants ,perform etc and even searched FM for the same but not found a solution .Your help will be greatly appreciated .
    Thanks in advance .
    Regards,
    Jaya

    Hi,
    You can change your statement as follows:
    DELETE FROM (v_table) WHERE EMP_NAME = 'ABDC' .
    However, I would not recommend this. There is a standard function module RSAN_ODS_DATA_DELETE which allows selective deletion - that should be a safer way to do this. You can

  • R/3 Table Name.

    Hi All,
    I have a list of say 600 field names along with their table names. (eg MARA table & BUKRS field)
    Now, i want to have the technical propertires of all those fields in the R/3 (only the data type and the length).
    So, is there any way out for determining the Length and data type in one go by any transaction or any firld name so that i dont ahve to go individually each field to rake its characteristic detail.
    Thanks in advance!
    Neha.

    Hi All,
    Problem is solved.The correct approach to go for the bulk number of fields is through a view "DDO3P" which gives the data type along with the length in one go.
    Thanks for your answers.

  • Need actual table name for Bom_Bo_Pub.Bom_Revision_Tbl_Type

    How can I get actual table name for Bom_Bo_Pub.Bom_Revision_Tbl_Type? I am trying to confirm if this particular table has a "REVISION_LABEL" column in 11.5.9.

    Duplicate post.
    Need to know actual table name for actual table name for Bom_Bo_Pub.Bom_Rev
    Need to know actual table name for actual table name for Bom_Bo_Pub.Bom_Rev

Maybe you are looking for