Urgent Need for creating 100 tables in Oracle.

Hello All,
I need to create 100 tables in oracle using a loop.
Please suggest . Advance thanks for your efforts.
ANto

I am getting the foll error at run time when executing the procedure ..
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "ORAUSER.CREATE_100_TABLE", line 9
ORA-06512: at line 1
The script goes here ...
create or replace procedure create_100_table
is
v_sql_string varchar2(200);
begin
for i in 1..100
loop
v_sql_string := 'create table ajames' || i || ' as select * from emp';
execute immediate v_sql_string;
end loop;
end;
------------------------

Similar Messages

  • Need To Create a table in Sql Server and do some culculation into the table from Oracle and Sql

    Hello All,
    I'm moving a data from Oracle to Sql Server with ETL (80 tables with data) and i want to track the number of records that i moving on the daily basis , so i need to create a table in SQL Server, wilth 4 columns , Table name, OracleRowsCount, SqlRowCount,
    and Diff(OracleRowsCount - SqlRowCount) that will tell me the each table how many rows i have in Oracle, how many rows i have in SQL after ETL load, and different between them, something like that:
    Table Name  OracleRowsCount   SqlRowCount  Diff
    Customer                150                 150            
    0
    Sales                      2000                1998          
    2
    Devisions                 5                       5             
    0
    (I can add alot of SQL Tasks and variables per each table but it not seems logicly to do that, i tryid to find a way to deal with that in vb but i didn't find)
    What the simplest way to do it ?
    Thank you
    Best Regards
    Daniel

    Hi Daniel,
    According to your description, what you want is an indicator to show whether all the rows are inserted to the destination table. To achieve your goal, you can add a Row Count Transformation following the OLE DB Destination, and redirect bad rows to the Row
    Count Transformation. This way, we can get the count of the bad rows without redirecting these rows. Since the row count value is stored in a variable, we can create another string type variable to retrieve the row count value from the variable used by the
    Row Count Transformation, and then use a Send Mail Task to send the row count value in an email message body. You can also insert the row count value to the SQL Server table through Execute SQL Task. Then, you can check whether bad rows were generated in the
    package by querying this table.  
    Regards,
    Mike Yin
    TechNet Community Support

  • How to Create a Table in Oracle with XML data type.

    Dear ALL,
    What are the requirements for creating a table with xml datatype in Oracle: The steps would help very much to know the scripting of the table and how to query and either insert/update and remove data from that table.
    Any help, direction, advise would be highly appreciated.
    Thanks.

    Reffer to this Note.243554.1.
    In a nut shell you will need to run catqm.sql

  • Procedures Creating a table in Oracle

    Hi DBAs
    I am new to oracle technology.
    I have created the database using dbca.
    Is it for creating a table we just require the sql create statement.
    On a server I have two databases running. If I do a sql create statement how do I specify in which database to create the table.
    I have connect as sysdba using command
    connect / as sysdba
    Also I want to know how to create separate database logins just as we do in MS SQL Server.
    Please help...
    deepak.

    > Hi DBAs
    Few DBAs here.. mostly developers. As the topic of this forum is not Oracle RDBMS administration, but the development languages called PL/SQL and SQL.
    > I am new to oracle technology.
    Then you need to make The Oracle Manuals your best friends. Go to http://tahiti.oracle.com and find the "List of Books" for the Oracle version you are using.
    Read the following manuals:
    - Oracle® Database Concepts
    - Oracle® Database Administrator's Guide
    > Also I want to know how to create separate database logins just as we do in
    MS SQL Server.
    The two have very little in common. Oracle != MS SQL-Server.
    The best you can do is to forget about what you have learned as a DBA or developer in SQL-Server - empty the old cup of SQL-Server in order to get stuck and start drinking the Oracle brew instead.
    Databases are different. In Oracle a logical database is called a schema. Concurrency is different. Locking is different. PL/SQL is a real/proper/formal procedural programming language and not a macro scripting language like Transact SQL. Oracle has many more index types than just B+trees. And a lot more features. And instead of BCP, there is SQL*Loader, Data Pump, Export/Import and external tables. The list goes on and on.
    My suggestion is read the complete Concepts guide and then browse through the Admin guide. The SQL Reference manual contains all you need to know about Oracle. The PL/SQL Reference manual does the same for PL/SQL. And when you want to develop, make sure you have read the Application Developer's Fundamentals guide.
    And yes - this is what you need to do to learn what Oracle is, and how to use it. There are no shortcuts to being a good Oracle DBA or developer.
    If the intention is being a mediocre one then of course, don't bother. :-)

  • Procedure for creating transparent table, data element and domain

    Hi,
    Can anybody let me know the procedure for creating transparent table, data element and domain.
    Thanks,
    Mahathi

    Hi
    Database table and its components
    A database table is the central data structure of the ABAP/4 data dictionary.
    The structure of the objects of application development are mapped in tables on the underlying relational database.
    The attributes of these objects correspond to fields of the table.
    A table consists of columns (fields) and rows (entries). It has a name and different attributes, such as delivery class and maintenance authorization.
    A field has a unique name and attributes; for example it can be a key field.
    A table has one or more key fields, called the primary key.
    The values of these key fields uniquely identify a table entry.
    You must specify a reference table for fields containing a currency (data type CURR) or quantity (data type QUAN). It must contain a field (reference field) with the format for currency keys (data type CUKY) or the format for units (data type UNIT). The field is only assigned to the reference field at program runtime.
    The basic objects for defining data in the ABAP Dictionary are tables, data elements and domains. The domain is used for the technical definition of a table field (for example field type and length) and the data element is used for the semantic definition (for example short description).
    A domain describes the value range of a field. It is defined by its data type and length. The value range can be limited by specifying fixed values.
    A data element describes the meaning of a domain in a certain business context. It contains primarily the field help (F1 documentation) and the field labels in the screen.
    A field is not an independent object. It is table-dependent and can only be maintained within a table.
    You can enter the data type and number of places directly for a field. No data element is required in this case. Instead the data type and number of places is defined by specifying a direct type.
    The data type attributes of a data element can also be defined by specifying a built-in type, where the data type and number of places is entered directly.
    <b>Two Level Domain Example</b>
    A domain defines a field technically and therefore it may
    be used at different business levels.
    A data element describes the meaning of a domain in a certain business context.
    A domain, however, is used for the technical definition of a table field (for example field type and length).
    Therefore, although a take-off airport (data element S_FROMAIRP) would have a different business meaning from an airport where a plane lands (data element S_TOAIRP), they could still have the same domain(here S_AIRPID) because technically we could assign the same number of characters whether the airport is a take-off or a landing airport.
    <b>Definitions of Table in Database</b>
    In SAP R/3 tables are defined as
    A) Transparent tables: All of the fields of a dictionary table correspond to a field in the real database table.
    B) Pooled tables: Different tables which are not linked to each other with a common key are combined into a TABLE POOL. Several logical tables thus exist as a single real database table.
    C) Cluster tables: Several tables linked by a common key may sometimes be combined by the data dictionary and made to exist on the database schema as a single table.
    SAP is evolving R/3 tables in transparent tables.
    <b>Elaboration on each of the definitions</b>
    A transparent table is automatically created on the database when it is activated in the ABAP Dictionary. At this time the database-independent description of the table in the ABAP Dictionary is translated into the language of the database system used.
    The database table has the same name as the table in the ABAP Dictionary. The fields also have the same name in both the database and the ABAP Dictionary. The data types in the ABAP Dictionary are converted to the corresponding data types of the database system.
    The order of the fields in the ABAP Dictionary can differ from the order of the fields on the database. This permits you to insert new fields without having to convert the table. When a new field is added, the adjustment is made by changing the database catalog (ALTER TABLE). The new field is added to the database table, whatever the position of the new field in the ABAP Dictionary.
    Tables can also reside on the database as Pooled tables or cluster tables
    Pooled Tables: Different tables which are not linked to each other with a common key can be combined into a Table Pool. The tables contained within this pool are called Pooled Tables. A table pool is stored in the database a simple table. The table's data sets contain, in separate fields, the actual key for the data set to be stored, the name of the pooled table and the contents of the data set to be stored.
    Using this schema, several logical tables are combined into a single real database table. Although the data structure of each set is lost during the write to the table pool, it is restored during the read by the ABAP/4 Data Dictionary. The ABAP/4 Data Dictionary utilizes its meta-data to accomplish this.
    Since information must be prepared (defined) within the ABAP/4 Data Dictionary when it is read or written to (or accessed), this process itself defines these as not transparent tables
    Cluster Tables: Occasionally, several tables may be linked by a common key. The ABAP/4 Data Dictionary can also combine these tables into a single table. Each data set of the real table within the database contains a key and in a single data field, several data sets of the subsequent table for this key.
    As mentioned above, these table types require special data handling, therefore they are not transparent tables.
    <b>Technical Settings in Dictionary</b>
    The data class logically defines the physical area of the database (for ORACLE the table space) in which your table should be created. If you choose the data class correctly, the table will automatically be created in the appropriate area on the database when it is activated in the ABAP Dictionary.
    The most important data classes are master data, transaction data, organizational data and system data.
    Master data is data that is rarely modified. An example of master data is the data of an address file, for example the name, address and telephone number.
    Transaction data is data that is frequently modified. An example is the material stock of a warehouse, which can change after each purchase order.
    Organizational data is data that is defined during customizing when the system is installed and that is rarely modified thereafter. The country keys are an example.
    System data is data that the R/3 System itself needs. The program sources are an example.
    Further data classes, called customer data classes (USER, USER1), are provided for customers. These should be used for customer developments. Special storage areas must be allocated in the database.
    The size category describes the expected storage requirements for the table on the database.
    An initial extent is reserved when a table is created on the database. The size of the initial extent is identical for all size categories. If the table needs more space for data at a later time, extents are added. These additional extents have a fixed size that is determined by the size category specified in the ABAP Dictionary.
    You can choose a size category from 0 to 4. A fixed extent size, which depends on the database system used, is assigned to each category.
    Correctly assigning a size category therefore ensures that you do not create a large number of small extents. It also prevents storage space from being wasted when creating extents that are too large.
    Modifications to the entries of a table can be recorded and stored using logging.
    To activate logging, the corresponding field must be selected in the technical settings. Logging, however, only will take place if the R/3 System was started with a profile containing parameter 'rec/client'. Only selecting the flag in the ABAP Dictionary is not sufficient to trigger logging.
    Parameter 'rec/client' can have the following settings:
    rec/client = ALL All clients should be logged.
    rec/client = 000[...] Only the specified clients should be logged.
    rec/client = OFF Logging is not enabled on this system.
    The data modifications are logged independently of the update. The logs can be displayed with the Transaction Table History (SCU3).
    Logging creates a 'bottleneck' in the system:
    Additional write access for each modification to tables being logged.
    This can result in lock situations although the users are accessing different application tables!
    <b>Create transparent table</b>
    Go to transaction SE11. Enter name of table you want to create (beginning with Y or Z) and click on create pushbutton
    Enter the delivery class and the table maintenance criteria
    The delivery class controls the transport of table data when installing or upgrading, in a client copy and when transporting between customer systems .
    The display/maintenance indicator specifies whether it is possible to display/maintain a table/view using the maintenance tools Data Browser (transaction SE16) and table view maintenance (transactions SM30 and SM31).
    Enter the name of the table field and the data element. The
    System automatically populates the technical details for
    existing data elements.
    So far as possible it is advisable to use existing data elements which befit the business requirements.
    However, we may create data elements if need be. The same is shown in the next slide.
    To create a data element simply double click on it.
    Alternately create a data element by simply choosing the
    data type radio button on SE11 initial screen.
    <b>Create data element</b>
    The system prompts you to create a new data element.
    Choose the Yes pushbutton.
    Under the data type tab enter the domain name which
    determines the technical characteristics of the field.
    Further characteristics tab: Allows you to specify a search help assigned to the data element.
    It also allows you to specify a parameter id which helps you populate a field from SAP memory.
    Field label: Can be assigned as prefixed text to a screen field referring to the ABAP Dictionary. The text is displayed on the screen in the logon language of the user (if the text was translated into this language).
    <b>Create domain</b>
    If the domain does not exist in the data dictionary the
    system prompts you to create one.
    Give the technical characteristics under the definition
    tab. Value range allows you value restriction at domain
    level.
    Value range tab:
    As explained in the section Consistency through input checks one can restrict the possible values for a field at domain level itself by either entering fixed values or by specifying a value table under the tab Value range.
    <b>Currency/Quantity fields in a table</b>
    A currency or a quantity field must be assigned a reference field from a reference table containing applicable qty unit or currency unit.
    Field of the reference table, containing the applicable quantity unit or currency
    A field containing currency amounts (data type CURR) must be assigned a reference field including the currency key (data type CUKY).
    A field containing quantity specifications (data type QUAN) must be assigned a reference field including the associated quantity unit (data type UNIT).
    <b>Create transparent table continue</b>
    Maintain the technical settings of the table by clicking on the tab

  • How to create a table in Oracle Lite database?

    Hi,
    I have installed SOA 10.1.3 on my laptop. Now I am trying to create a table in the database to do some own examples. I have problem in installing oracle database. So I am trying to create a table in Oracle Lite database which comes with SOA suite. I am not able to do it, can some body suggest me please?
    Regards
    Khaleel

    HI James,
    Thank you so much. I am able to create table and insert rows and able to select them too. However I am not able to use these tables in my BPEL process for my practice. The DB adapter is throwing some error, any idea?
    --khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need to create a table

    hi
    i need to create a table emp( eno, ename, salary, address, doj, dob(dd-mm-yyyy), phone, city)
    which datatype suits for the dob column. as we need to enter in the format as 'dd-mm-yyyy'.
    please help.

    Hi,
    1009262 wrote:
    hi
    i need to create a table emp( eno, ename, salary, address, doj, dob(dd-mm-yyyy), phone, city)
    which datatype suits for the dob column. as we need to enter in the format as 'dd-mm-yyyy'.The DATE datatype is best for anything that indicates a point in time. Which format you want has nothing to do with the data type; DATEs can be entered or displayed in virtually any format you wish. I've said it, and the 2 earlier replies said it, but this is important enough to repeat: Always use the DATE datatype for information about dates.
    The only exception is when fractions of a second are significant, or when you need to capture time zone information along with the date. In that case, use the TIMESTAMP data type, but DATEs are a lot easier to use, and there are many more useful built-in functions for manipulating DATEs, so use DATEs whenever possible. For date-of-birth, you probably don't want to record hours, minutes or seconds, let alone fractions of a second, so there's no reason to use a TIMESTAMP, and there is never any reason to use any other datatype, such as VARCHAR2 or NUMBER.

  • Error in creating partition table in oracle spatial by ankur

    Hi,
    Am working on Oracle 10.2.0.3
    Am not able to create partition table in Oracle
    i have all the required columns in node and edge table ......the moment i try to create partition table using exec sdo_router_partition.partion_router i get the following error:
    ERROR at line 1:
    ORA-00947: not enough values
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 1510
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 661
    ORA-06512: at line 1
    Can someone help ??

    hey i have found the solution myself :)

  • Special authorization need for read cluster table??

    In one report, I use following coding to read information from RFDT table:
    form get_f110_parm .
      f110id-laufd   = p_laufd.
      f110id-laufi   = p_laufi.
      f110versionpar = space.
      clear:   buktab, fkttab, slktab, sldtab, trctab, usrtab,
               faetab, jobtab, f110v, f110c,  trcopt, f110versionpar.
      import buktab fkttab slktab sldtab trctab usrtab
             faetab jobtab f110c trcopt f110versionpar
             from database rfdt(fb) id f110id
             accepting padding.
    endform.                    " GET_F110_PARM
    I can fill F110c, trcopt and f110versionpar by this program. But there is no entry in table like fkttab, usrtab.
    Is there any authorization need for read cluster table??
    Thanks in advance.
    Edited by: Amy Xie on Dec 21, 2010 10:41 AM

    Hello,
    After you run your code, check transaction SU53 to see if any authorization check failed.

  • Urgent need for Free Goods configuration

    Hi,
         i need a document which have steps to configure free goods.
    i created a condition record using VBN3 using condition NA00 but free goods doesn't come.
    Requirement is
    Customer buys 10 items whose item catg is TAN and 1 item is free.  so cust pays only for 9 items.
    free good is not coming as sub item. i got stuck. please help .
    anybody plz send document which have steps to configure.
    my email id is [email protected]
    Thanks
    Afsar

    Free Goods Determination in Sales Order
    Free goods has the following limitations:
    - Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: ‘With material 1, material 2 and material 3 are free of charge‘ or ‘If material 1 and material 2 are ordered at the same time, then material 3 is free of charge‘.
    - Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    - Free goods are only supported for sales orders with document category C (for example, not quotations).
    - Free goods are not supported for deliveries without reference to a sales order.
    - Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    - If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    4.6x
    Not all Sales Order can be used for free goods determination.  You have to check the SD document category if it does not work.  Only category 'C' are supported.  Check transaction VOV8.
    Assume that you want to configure an inclusive FREE goods routine.  Customers must order a minumum quantity of 5 before any free goods can be assign.  For every quantity of 3, the customer will be given 1 free goods.
    WC07 - Maintain Number Range Intervals
    e.g.
    No   From number       To number
    01    0000010000         0000099999
    IMG -> Sales and Distribution -> Basic Functions -> Free Goods ->
    Maintain Access Sequences
    New Entries
    Acsq
    NA00
    Save
    Maintain Condition Types
    New Entries
    Ctyp   Name             AcSq
    FREE  Free Goods    NA00
    Save
    Maintain Pricing Procedures
    Procedures
    New Entries
    Procedure   Description
    FREE           Free Goods
    Select Procedure FREE then click Control data
    Step   Cntr   Ctyp
    10       10      FREE
    V/N6 - Activate Free Goods Determination
    Assign Order Type OR with Document Procedure A with Procedure FREE
    VBN1 - Create free goods determination
    e.g.  FREE inclusive
    Material  Min qty   From   are free good   Calc Rule   Free Goods
                           5           3                1                      1                1
    In this example, if you create a Sales Order for a quantity of 10, SAP will prompt you 7 as the customer order qty and 3 will be free.  Customer only pay for the 7 quantity.
    Free goods –
    Free goods play a large role in price negotiations with your customers. As a result, free goods are determined to be placed in sales document automatically. In retail, chemical industry or consumer goods industry, it is common to provide discounts in the form of free goods.
    Inclusive Bonus Quantities – Free goods can be part of order quantity not included in the invoice (billing). This is called inclusive bonus quantity. The ordered goods and the free goods both involve the same material. The quantity units of the free goods and the ordered goods must be the same.
    Exclusive Bonus Quantities – Free goods that take the form of extra goods that are free of charge are called exclusive bonus quantities. In this case, the extra bonus quantities are not typically included in the invoice (billing). This can either be an additional quantity of the goods ordered or it can be another article. The exclusive free of goods appear in the SD document as an individual ‘free of charge’ item.
    Both types of free goods are treated in the same way in the sales order. The material that has been ordered is entered as a main item (TAN) and the free item (TANN) is automatically displayed as a sub item. The item category determines how the item is controlled later in the business process.
    The system re-reads the free goods master record in the sales order if the quantities in the main item change or if the pricing date changes. The system then deletes the sub items and re-creates them. Any manual changes to the free goods quantity are lost.
    Note: If pricing is re-run in the sales order, it does not affect the free goods determination.
    The condition technique is used for free goods. Free goods are generally regarded as a supplement to the pricing agreement for a material. You can define master records for free goods at any level such as material, customer/material, price list category/currency/material or customer hierarchy/material. The transaction code is VBN1 and condition type – NA00 which automatically gets converted into R100 during sales document processing.
    You can restrict a free goods condition master record for one level in many ways –
    a. Validity period: the condition is only valid within this period
    b. Lowest quantity: the condition comes into affect when this quantity has been exceeded.
    c. Delivery control:
    d. Calculation type:
    e. Scales
    You can process different master data with the same key for inclusive and exclusive bonus quantities at the same time. You only need to press a button to switch between two types of discount. When you enter an exclusive bonus quantity, an extra entry line appears where you can enter the free material if it is not the same as the ordered material.
    When you specify a calculation rule, you decide how the system determines the free goods quantity in the sales order from the additional and document quantities.
    a. The free goods quantity is the quantity that is calculated from the discount quantity (not the minimum quantity)
    b. Additional quantity is the quantity delivered free of charge
    c. Document quantity is the quantity entered by the person creating the sales order.
    Three calculation rules are provided by the system i.e.
    Prorated – the system calculates the free goods in right proportion to document the quantity. For example – if 20 units are offered for free for 100 units in the condition record and the customer orders 162 units, then the system calculates 162 * 20/100 (rounded off) as free goods.
    Related to units – 20 units are given for free for every 100 units ordered. In the above case the customer would only get 20 units free as he placed an order for 162 units.
    Whole units – the customer would not get any free goods if he doesn’t match the exact quantity proposed. That is, in the above case, the customer doesn’t get any free goods as the ordered quantity did not match 100 units. Anything below or over the mark will not be qualified for a free good.
    Calculation rules are stored in the system in the form of ABAP/4 code. You can also define your own rules by using transaction code VOFM (system modifications).
    The free goods determination procedure contains a list of condition types for the free goods. One access sequence is assigned to each condition type and each access sequence contains one ore more accesses and each access contains exactly one table. This represents the search key that the system uses to search for valid condition records.
    The free goods determination procedure is assigned to sales area + document pricing procedure + customer pricing procedure just as in the case of pricing procedure assignment as free goods are generally regarded as a supplement to the pricing agreement for a material.
    If the search is successful, the system generates a sub item for free goods in the document. The item category is assigned with the item category usage FREE.
    You can activate an analysis of the free goods determination in the sales document. The system then displays detailed information on how the free goods were determined.
    Reward points if useful
    Message was edited by:
            SHESAGIRI GEDILA

  • How to generate test data for all the tables in oracle

    I am planning to use plsql to generate the test data in all the tables in schema, schema name is given as input parameters, min records in master table, min records in child table. data should be consistent in the columns which are used for constraints i.e. using same column value..
    planning to implement something like
    execute sp_schema_data_gen (schemaname, minrecinmstrtbl, minrecsforchildtable);
    schemaname = owner,
    minrecinmstrtbl= minimum records to insert into each parent table,
    minrecsforchildtable = minimum records to enter into each child table of a each master table;
    all_tables where owner= schemaname;
    all_tab_columns and all_constrains - where owner =schemaname;
    using dbms_random pkg.
    is anyone have better idea to do this.. is this functionality already there in oracle db?

    Ah, damorgan, data, test data, metadata and table-driven processes. Love the stuff!
    There are two approaches you can take with this. I'll mention both and then ask which
    one you think you would find most useful for your requirements.
    One approach I would call the generic bottom-up approach which is the one I think you
    are referring to.
    This system is a generic test data generator. It isn't designed to generate data for any
    particular existing table or application but is the general case solution.
    Building on damorgan's advice define the basic hierarchy: table collection, tables, data; so start at the data level.
    1. Identify/document the data types that you need to support. Start small (NUMBER, VARCHAR2, DATE) and add as you go along
    2. For each data type identify the functionality and attributes that you need. For instance for VARCHAR2
    a. min length - the minimum length to generate
    b. max length - the maximum length
    c. prefix - a prefix for the generated data; e.g. for an address field you might want a 'add1' prefix
    d. suffix - a suffix for the generated data; see prefix
    e. whether to generate NULLs
    3. For NUMBER you will probably want at least precision and scale but might want minimum and maximum values or even min/max precision,
    min/max scale.
    4. store the attribute combinations in Oracle tables
    5. build functionality for each data type that can create the range and type of data that you need. These functions should take parameters that can be used to control the attributes and the amount of data generated.
    6. At the table level you will need business rules that control how the different columns of the table relate to each other. For example, for ADDRESS information your business rule might be that ADDRESS1, CITY, STATE, ZIP are required and ADDRESS2 is optional.
    7. Add table-level processes, driven by the saved metadata, that can generate data at the record level by leveraging the data type functionality you have built previously.
    8. Then add the metadata, business rules and functionality to control the TABLE-TO-TABLE relationships; that is, the data model. You need the same DETPNO values in the SCOTT.EMP table that exist in the SCOTT.DEPT table.
    The second approach I have used more often. I would it call the top-down approach and I use
    it when test data is needed for an existing system. The main use case here is to avoid
    having to copy production data to QA, TEST or DEV environments.
    QA people want to test with data that they are familiar with: names, companies, code values.
    I've found they aren't often fond of random character strings for names of things.
    The second approach I use for mature systems where there is already plenty of data to choose from.
    It involves selecting subsets of data from each of the existing tables and saving that data in a
    set of test tables. This data can then be used for regression testing and for automated unit testing of
    existing functionality and functionality that is being developed.
    QA can use data they are already familiar with and can test the application (GUI?) interface on that
    data to see if they get the expected changes.
    For each table to be tested (e.g. DEPT) I create two test system tables. A BEFORE table and an EXPECTED table.
    1. DEPT_TEST_BEFORE
         This table has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look BEFORE the
         test for that test case is performed.
         CREATE TABLE DEPT_TEST_BEFORE
         TESTCASE NUMBER,
         DEPTNO NUMBER(2),
         DNAME VARCHAR2(14 BYTE),
         LOC VARCHAR2(13 BYTE)
    2. DEPT_TEST_EXPECTED
         This table also has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look AFTER the
         test for that test case is performed.
    Each of these tables are a mirror image of the actual application table with one new column
    added that contains a value representing the TESTCASE_NUMBER.
    To create test case #3 identify or create the DEPT records you want to use for test case #3.
    Insert these records into DEPT_TEST_BEFORE:
         INSERT INTO DEPT_TEST_BEFORE
         SELECT 3, D.* FROM DEPT D where DEPNO = 20
    Insert records for test case #3 into DEPT_TEST_EXPECTED that show the rows as they should
    look after test #3 is run. For example, if test #3 creates one new record add all the
    records fro the BEFORE data set and add a new one for the new record.
    When you want to run TESTCASE_ONE the process is basically (ignore for this illustration that
    there is a foreign key betwee DEPT and EMP):
    1. delete the records from SCOTT.DEPT that correspond to test case #3 DEPT records.
              DELETE FROM DEPT
              WHERE DEPTNO IN (SELECT DEPTNO FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3);
    2. insert the test data set records for SCOTT.DEPT for test case #3.
              INSERT INTO DEPT
              SELECT DEPTNO, DNAME, LOC FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3;
    3 perform the test.
    4. compare the actual results with the expected results.
         This is done by a function that compares the records in DEPT with the records
         in DEPT_TEST_EXPECTED for test #3.
         I usually store these results in yet another table or just report them out.
    5. Report out the differences.
    This second approach uses data the users (QA) are already familiar with, is scaleable and
    is easy to add new data that meets business requirements.
    It is also easy to automatically generate the necessary tables and test setup/breakdown
    using a table-driven metadata approach. Adding a new test table is as easy as calling
    a stored procedure; the procedure can generate the DDL or create the actual tables needed
    for the BEFORE and AFTER snapshots.
    The main disadvantage is that existing data will almost never cover the corner cases.
    But you can add data for these. By corner cases I mean data that defines the limits
    for a data type: a VARCHAR2(30) name field should have at least one test record that
    has a name that is 30 characters long.
    Which of these approaches makes the most sense for you?

  • Easy Loader creates Additional tables in Oracle 10G

    Hellow everybody
    I have uploaded a MapInfo TAB file into OracleSpatial 10G, using EasyLoader utility in MapInfo prof 8.0. To my surprise I found some additional tables created apart from the loaded spatial table. They are
    BIN$3K6Am/kGSH6qQR1cSxw1yQ==$0
    BIN$uL2fNlZOTHGh1erc17qOIw==$0
    BIN$/0NNB59pSo6Bl8t/LzxsQg==$0
    BIN$onUlr5+ASVieMUvi/y36rA==$0
    What are these tables? and why are they created?
    Regards
    Sunny

    Those tables are not created by Easyloader.- at least not directly.
    Starting with 10g, the database now contains a "recycle bin" much like the NTFS file system. Whenever you drop a table, that table does not really get dropped: it gets renamed to objects with obscure names (like BIN$onUlr5+ASVieMUvi/y36rA==$0).
    You can see the actual names of the objects in your recyble bin by doing:
    SQL> select * from recyclebin;
    And restore (undrop) a table by doing, for example:
    SQL> flashback my_table to before drop;
    So, either you dropped some tables before (or after) running easyloader, or possibly easyloader created some tables which it then dropped.
    Oh, and I forgot. To clear out your bin, do:
    SQL> purge recyclebin;
    If you intend to use this feature, I strongly recommend that you first read the admin manual first (section titled "Using Flashback Drop and Managing the Recycle Bin") - available here: http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10739/tables.htm#sthref2006

  • Help needed for report on tables vbak and vbap

    Hello,
    I needed help in one of my work issues, this is my first project and Iam still learning. kindly help.
    I was asked to take erdat,vbeln,posnr from selection screen and compare it with the data already in tables vbap,vbak. If the data
    already exists and exception needs to be raised saying that the 'data exists',but if the data is not present in the tables the
    tables have to be updated. This has to be done using function module only.
    Then I have to write a REPORT calling the above function module and finally displaying the number of records updated and the
    list of them.
    I have started writing a function module:
    FUNCTION z_tableupdate.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(DATE) LIKE  VBAK-ERDAT DEFAULT SY-DATUM
    *"     VALUE(SALESORDERNO) LIKE  VBAK-VBELN
    *"     VALUE(ITEMNO) LIKE  VBAP-POSNR
    *"  EXPORTING
    *"     VALUE(EX_VBAP) LIKE  VBAP STRUCTURE  VBAP
    *"     VALUE(SYS) LIKE  SY-SYSID
    *"     VALUE(EX_VBAK) LIKE  VBAK STRUCTURE  VBAK
    *"  EXCEPTIONS
    *"      DATA_UPDATED
    *"      DATA_EXISTS
      SELECT * FROM vbak INTO vbak_wa WHERE erdat = date
                                        AND vbeln = salesorderno.
      ENDSELECT.
      SELECT * FROM vbap INTO vbap_wa WHERE posnr = itemno.
      ENDSELECT.
      IF sy-subrc EQ 0.
        ex_vbap = vbap_wa.
        ex_vbak = vbak_wa.
      ELSE.
        RAISE data_exists.
      ENDIF.
      sys = sy-sysid.
    ENDFUNCTION.
    How is the above code for function module, will this work??
    Now can I write a report to call the above function module and update the record?? if so, how to update ??? please help...Lots of thanks in advance.

    Hi
    Welcome to SDN forum
    Whay can't you write a simple report in SE38.
    why you are using Fun module
    Nothing wrong in it.
    But first become perfetc in reports in SE38 and then do using the fun modules
    write a simple select statement like
    SELECT AVBELN AERDAT BPOSNR BMATNR
    INTO TABLE ITAB
    FROM VBAK AS A JOIN VBAP ON
    AVBELN = BVBELN
    WHERE A~VBELN  IN  S_VBELN AND
                 A~ERDAT  IN  S_ERDAT AND
                 B~POSNR IN S_POSNR.
    IF SY-SUBRC <> O.
      WRITE: / 'No data found'.
    ENDIF.
    First write this in SE38 by defining a proper selection screen and internal tables
    then do as fun module
    see the doc for fun module
    Function Modules;
    Check this matter.
    Function Modules are Global ABAP programs created by SAP for reusable purpose.they have IMPORT,EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
    You can create them from TCode SE37.
    Go through the following doc:
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for 'pass by value' is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    Regards
    Anji

  • DB proc - do you need to create a table to pass a ref cursor record type?

    I want to pass a limited selection of columns from a large table through a DB procedure using a REF CURSOR, returning a table rowtype:
    CREATE OR REPLACE package XXVDF_XPOS_DS021_ITEMS AS
         TYPE XXVDF_XPOS_DS021_ITEM_ARRAY
         IS REF CURSOR
         return XXVDF_XPOS_DS021_ITEM_TABLE%ROWTYPE;
    Do I need to create this dummy table?
    I can't get a TYPE to work, where the type is an OBJECT with the desired columns in it.
    So a dummy empty table will sit in the database...
    Is there another way?
    thanks!

    You can use RECORD type declaration:
    SQL> declare
      2   type rec_type is record (
      3    ename emp.ename%type,
      4    sal emp.sal%type
      5   );
      6   type rc is ref cursor return rec_type;
      7   rc1 rc;
      8   rec1 rec_type;
      9  begin
    10   open rc1 for select ename, sal from emp;
    11   loop
    12    fetch rc1 into rec1;
    13    exit when rc1%notfound;
    14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    15   end loop;
    16   close rc1;
    17  end;
    18  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300or use, for example, VIEW to declare rowtype:
    SQL> create view dummy_view as select ename, sal from emp;
    View created.
    SQL> declare
      2   type rc is ref cursor return dummy_view%rowtype;
      3   rc1 rc;
      4   rec1 dummy_view%rowtype;
      5  begin
      6   open rc1 for select ename, sal from emp;
      7   loop
      8    fetch rc1 into rec1;
      9    exit when rc1%notfound;
    10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    11   end loop;
    12   close rc1;
    13  end;
    14  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300 Rgds.

  • Steps for Creating a Report in Oracle Apps

    I need the steps for creating a Report 2.5 in Oracle Apps.
    Please let me know the steps involved in detail
    Regards
    Choudary

    First you create the report using reports 2.5. (You need to refer Application Developer's User Guide to understand Apps standards for customization)
    Then register the report in Apps:
    1) Define the executable
    2) Place the executable in the appropriate directory (You need to refer Apps installation guide to find the directory structure for placing reports)
    3) Define the concurrent program (Pay attention when you define program parameters and value sets associated)
    4) Attach your report to the request group attached to your responsibility
    5) Run the concurrent program using SRS (you will not see the report when you open Submit Requests Form, if you do have permission)
    The above procedure is applicable if you are defining the report directly in your instance. If you are using chain link, then you may have to migrate the objects appropriately.
    Some of the above activities are usually done by System Administrator and users are not given permissions.

Maybe you are looking for

  • Upload the data from excel sheet to form 6i

    hi all, i am using Forms [32 Bit] Version 6.0.8.24.1 (Production) my requirement is to import data from excel to forms. i have gone through the help, they have mentioned as below To build this demo: 1     Create a spreadsheet containing the initial d

  • "Day limit" in terms of payment

    hi all, can someone explain me the purpose of the below fields in terms of payment, preferably with scenario ? day limit fixed day additional months Regards, Surya

  • Master Line Form in Apex

    Dear All, We have created a master child form in our application using Oracle Application Express, Using this Form, we are able to do some modification in the child table based on the foreign key that exist in the master table. But in the line form w

  • Hyperlinks in iWeb

    Hello, is there a way to generate scrolldown menus in iWeb? How do i build highlighting menu fields like in the menu bar above on this page here? I didn't find this options in iWeb - are there additional tools or applications to do that? Thanks in ad

  • Select which users doesn't logged their work yesterday on MS Project 2013

    We use MS Project 2013 to control people work report. I wanna make a SQL query that will catch all users that doesn't set their work yesterday on WebProject App. My intention on that is to alert them by e-mail about this. If the user doesn't logged h