HOW TO create a temp table or a record group at run time

i have a a tabular form and i dont want to allow the user entering duplicate
records while he is in insert mode and the inserted records are new and not exsisting in the database.
so i want to know how to create a temp table or a record group at run time to hold the inserted valuse and compare if they are exsiting in previous rows or no.
please help!

As was stated above, there are better ways to do it. But if you still wish to create a temporary block to hold the inserted records, then you can do this:
Create a non-database block with items that have the same data types as the database table. When the user creates a new record, insert the record in the non-database block. Then, before the commit, compare the records in the non-database block with those in the database block, one at a time, item by item. If the record is not a duplicate, copy the record to the database block. Commit the records, and delete the records in the non-database block.

Similar Messages

  • How to create a temp table in the memory, not in disk?

    in sql server, you can create a temp table in the memory instead of disk,
    then you can do the insert, delete,update and select on it.
    after finishing, just release it.
    in Oracle,
    I am wonderfing how to create a temp table in the memory, not in disk?
    thanks,

    Thanks for rectifying me Howard.
    I just read your full article on this too and its very well explained here:
    http://www.dizwell.com/prod/node/357
    Few lines from your article
    It is true, of course, that since Version 8.0 Oracle has provided the ability to create a Keep Pool in the Buffer Cache, which certainly sounds like it can do the job... especially since that word 'keep' is used again. But a keep pool is merely a segregated part of the buffer cache, into which you direct blocks from particular tables (by creating them, or altering them, with the BUFFER POOL KEEP clause). So you can tuck the blocks from such tables out of the way, into their own part of the buffer cache... but that is not the same thing as guaranteeing they'll stay there. If you over-populate the Keep Pool, then its LRU mechanism will kick in and age its contents out just as efficiently as an unsegregated buffer cache would.
    Functionally, therefore, there can be no guarantees. The best you can do is create a sufficiently large Keep Pool, and then choose the tables that will use it with care such that they don’t swamp themselves, and start causing each other to age out back to disk.
    Thanks and Regards

  • How to create the temp table in Sybase with values from Excel ?

    Dear Sir/Madam,
    I know this is not related with oracle DB, however i am in the need of help from you people who worked on Sybase. plz help me..
    I have the excel sheet which contains EmpId and EmpName values. I just wanted to read these two values one by one from an excel sheet and loaded them into one temp table in Sybase. is it possible thru sqlldr ?
    here is the sample code for your reference:
    begin tran
    create table tempdb..empIdName (emp_id int identity,emp_name varchar(50))
    go
    Awaiting for your valuable reply
    thanks
    pannar

    there is some hint provided by sybase user
    If it's Sybase IQ, you can export the excel file to a CSV file, then use a LOAD TABLE statement to get the data into your temporary table.
    For ASE, BCP would provide similar functionality.
    I am using ISQLW tool to work with sybase DB. what query to load the excel data to tem table in sybase. anyone who knows this? help me

  • When analytical queries create implicit temp tables?

    Hi,
    We have a DSS project on Oracle 9i Release 2 running on HP-UX. The project includes lots of SQL Analytical queries which handle huge data set, and makes lots of hash/merge joins and sorts. When I look at execution plans of the queries, I see that some of them create implicit temp tables and execute on it, but some not (creating window(buffer) ). I wonder how the optimizer decides to create implicit temp table when executing analytical queries. And also is three a SQL hint to force to create implicit temp table?
    Regards

    Hi,
    We have a DSS project on Oracle 9i Release 2 running on HP-UX. The project includes lots of SQL Analytical queries which handle huge data set, and makes lots of hash/merge joins and sorts. When I look at execution plans of the queries, I see that some of them create implicit temp tables and execute on it, but some not (creating window(buffer) ). I wonder how the optimizer decides to create implicit temp table when executing analytical queries. And also is three a SQL hint to force to create implicit temp table?
    Regards

  • PL/SQL to create a temp table that will be dropped after session ends

    Is it possible in PL/SQL to create a temp table that will be dropped after the session ends? Please provide example if possible. I can create a global temp table in PL/SQL but I am not sure how (if possible) to have it 'drop' once the session ends.
    DB: 10g
    OS: Wiindoze 2003 Server
    :-)

    As others have mentioned (but probably not clearly explained), Oracle treats temporary tables differently to SQL Server.
    In SQL Server you create a temporary table and it gets dropped (automatically I assume, I dont do SQL Server) after the session finishes. This will obviously allow each session to "request" a temporary table to use, then use it, and not have to worry about cleaning up the database after the session has finished.
    Oracle takes a different approach...
    On the assumption that each session is likely to be creating a temporary table for the same purposes, with the same structure, Oracle let's you create a Global Temporary Table a.k.a. GTT (which you've already come across). You only have to create this table once and you leave it on the database. This then means that any code written to use that table doesn't have to be dynamic code and can be verified and checked at compile time, just like code written for any other table. The difference of a GTT from a regular table is that any data you put into that table can only be seen by that session and will not interfere with any data of other sessions and, when you either commit, or end the session (depending on the "on commit delete rows" or "on commit preserve rows" option used when creating the GTT), that data from your own session will automatically be removed and hence the table is cleaned up that way, whilst the actual table itself remains.
    Some people from SQL Server backgrounds try and create and drop tables dynamically in their PL/SQL code, but this leads to problems...
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    execute immediate 'create table my_temp (x number)';
      3    insert into my_temp values (1);
      4    execute immediate 'drop table my_temp';
      5* end;
    SQL> /
      insert into my_temp values (1);
    ERROR at line 3:
    ORA-06550: line 3, column 15:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 3, column 3:
    PL/SQL: SQL Statement ignoredi.e. the code will not compile for direct DML statements trying to use that table.
    They then try and get around this issue by making their DML statements dynamic too...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure my_proc is
      2  begin
      3    execute immediate 'create table my_temp (x number)';
      4    execute immediate 'insert into my_temp values (''A'')';
      5    execute immediate 'drop table my_temp';
      6* end;
    SQL> /
    Procedure created.... which looks great and it compiles ok... but... when they try and run it...
    SQL> exec my_proc;
    BEGIN my_proc; END;
    ERROR at line 1:
    ORA-01722: invalid number
    ORA-06512: at "SCOTT.MY_PROC", line 4
    ORA-06512: at line 1... oops the code has a bug in it. Our DML statement was invalid.
    This is really something that would have been caught at compile time, if the statement had been a direct DML statement rather than dynamic. And thus we see the problem with people trying to write all their code as dynamic SQL... it's more likely to contain bugs that won't be detected at compile time and only come to light at run time... sometimes only under certain conditions and sometimes once it's got into a production environment. Bad Idea!!!! ;)
    Far better to never create tables (or most other database objects) at run time. Just create them once as part of the database design/implementation and use them as required, allowing you to catch the most common coding errors up front before they get anywhere near a test environment or worse still, a production environment.

  • How to create the custom table?

    Hi, how to create the custom table and how to integrate the table with defferent R/3?
    my requiremnt is i have to create the two tables and those i have to integrate with the existed R/3 and using those R/3 i have to update my custom tables .....can give me some idea?
    Tks
    DPk

    how to create the custom 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.
    how to integrate the table with defferent R/3
    Transport the Table to the another server/client/qas/prd
    Kanagaraja L

  • How to Create Event polling table

    hi,
    1)How to Create Event polling table
    2) wahts RPD stands for.
    3) when we are prefer Dynamic variables.
    thanks.
    raj

    1) http://obiee101.blogspot.com/2008/07/obiee-managing-cache-emptyingpurging.html
    2) Repository Project Design ?
    - More than likely the extension RPD was not used by anything else when Siebel Analytics first started using it, no doubt the 'RP' is repository, so use 'Definition' or 'Design' as you like. Im pretty sure there is nothing in the documentation but i've not checked, maybe you could check and let us know?
    3) Dynamic variables would be something like 'CURRENT_MONTH' where the same query does not need to fire per user (ie SESSION variable) but needs to be periodically refreshed. Another use of you dynamic variable might be 'LAST_ETL_DATE' or somethng similar which might implement with your event polling table. By including the Variable within a Business Model, all cache for the Business Model is purged whenever the Variable's value changes.

  • How to create variant for table/view ?

    Hi,
    When I go through SM30, I find a radio button called variant. I don't know the effect.
    Can anyone tell me how to create variant for table / view ?
    I want to know when we need to create variant for table/view.
    Best regards,
    Chris Gu

    hi ,
    Whenever you start a program in which selection screens are defined, the system displays a set of input fields for database-specific and program-specific selections. To select a certain set of data, you enter an appropriate range of values.
    For further information about selection screens, refer to Selection Screens in the ABAP User's Guide.
    If you often run the same program with the same set of selections (for example, to create a monthly statistical report), you can save the values in a selection set called a variant
    Procedure
    To create a new variant:
           1.      On the ABAP Editor initial screen, enter the name of the program for which you want to create a variant, select Variants, and choose Change.
           2.      On the variant maintenance initial screen, enter the name of the variant to be created.
    Note the naming convention for variants (see below).
           3.      Choose Create.
    If the program has more than one selection screen, a dialog box for screen assignment appears. The dialog box does not appear if the program only has one selection screen. The selection screen appears in this case.
           4.      If there is more than one selection screen, select the screens for which you want to create the variant
    5.      Choose Continue.
    The (first) selection screen for the report appears.
    If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them and to fill the fields with values. If you keep scrolling forwards, the Continue button appears on the last selection screen.
           6.      Enter the desired selection values, including multiple selection and dynamic selection.
           7.      Choose Continue.

  • How to create a booking table (make online reservation)

    Hi everyone,
    I'm just wondering if any of you know how to create a booking
    table, like a booking seat for an airplane... I have to do the
    booking table as I'm doing a Japanese Restaurant website for my
    project.. At the moment, I'm using PHP, MySQL and HTML..
    Could anyone help me, please?
    Cheers,
    Nova

    You first need to check with your host to see which type of
    server side
    scripting language they support. If they support PHP, try,
    http://www.jellyform.com/
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Blog:
    http://avenuedesigners.com/blog/
    Web dev articles, photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "mastacraft" <[email protected]> wrote in
    message
    news:f3pote$d16$[email protected]..
    > Hello,
    >
    > I need to create a booking form for a website- So wen
    they fill out form
    > for
    > bookings. Should have tab for club appearance. Magazine
    ads. Etc It needs
    > to
    > lead to this email : [email protected]
    >
    > I'm really not sure how the best way is to do this, i
    understand it's
    > probably
    > a really simple process.
    >
    > Regards,
    >

  • How to create a new table based out of old data rows

    Hi All,
    How to create a new table based out of old data rows. Also how can we find out the DBF for different users in a database?
    Saqib

    Not very clear what you need. I'll try to interpret...
    How to create a new table based out of old data rowsIf this means how to create a table from an existing one, then you can do :
    SQL> create table <new table> as select * from <old table>;
    if you need a subset of rows you can add a where clause.
    how can we find out the DBF for different users in a database?Here I need some more clarification. What do you mean exactly ?

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • How to create a dynamic table were the JTable columns keep varying

    How to create a dynamic table were the JTable columns keep varying based on the input to the jtable

    Oooh, I lied. DefaultTableModel has an API for adding and
    removing columns. I didn't know that. You should have read
    the API.
    As for preferring to extend AbstractTableModel rather than
    DefaultTableModel, I think it's more correct. DefaultTableModel
    is a simple implementation of Abstract for basic cases. It isn't
    intended to be extended. I figure most people extending
    DefaultTableModel are also extending JFrame, JPanel, and Thread
    instead of encapsulating the first two and implementing
    Runnable for the third.

  • How to create the fact table

    pleae let me know how to create the fatc table by using pl/sql packages
    Edited by: 792988 on Sep 6, 2010 3:34 AM

    Please let us know something about your fact table.
    There's no create_fact_table() procedure that could satisfy everybody.

  • Question on how to create a pivot table

    Hi,
    I am trying to create a dynamic pivot table (the number of column and row layers change for each request) and I cannot use a data base structure to back it up.
    I thought of doing it through a managed bean but in order to do it I need to know how to create the PivotTableModel.
    The pivot table model requires a data source object and I do not know how to create it to support multiple row and column layers.
    Is there a default data source object that I can extend, or better yet is there a written example on how to create a pivot table model using a managed bean.
    Thanks,
    Or

    Hi,
    duplicate of ADF -11g : Question on how to create a pivot table

  • ADF -11g : Question on how to create a pivot table

    Hi,
    I am trying to create a dynamic pivot table (the number of column and row layers change for each request) and I cannot use a data base structure to back it up.
    I thought of doing it through a managed bean but in order to do it I need to know how to create the PivotTableModel.
    The pivot table model requires a data source object and I do not know how to create it to support multiple row and column layers.
    Is there a default data source object that I can extend, or better yet is there a written example on how to create a pivot table model using a managed bean.
    Thanks,
    Or
    Edited by: user638363 on Dec 18, 2008 7:02 AM

    Hi,
    beyond the documentation, the pivot table is described in
    http://technology.amis.nl/blog/2593/adf-faces-11g-reloading-the-matrix-using-the-pivot-table-component
    http://technology.amis.nl/blog/3786/creating-a-salary-heat-map-with-the-adf-11g-faces-pivottable-component
    http://technology.amis.nl/blog/3673/adf-11g-richfaces-a-closer-look-at-the-pivot-table-data-visualization-component
    I am not aware of any sample that directly meets your requirement
    Frank

Maybe you are looking for

  • 17 inch MAC book pro will not boot up

    My 17 inch MAC Book Pro will not power/boot up.  The battery is charged and it displays a green light on the power adapter.  However, it will not boot up.

  • Meebo: how to get rid of it in Snow Leopard

    Please help me get rid of it. It doesn't show in Spotlight, extensions, finder or applications. Did Google hide it in my macbook?

  • Using a BM 3.8 RADIUS Server to Assign Users to VLANs

    I'm trying to use Bordermanager 3.8 RADIUS to assign VLANs to users. The users are accessing the network via Cisco 1100 Aironet Wireless Access Points. We have defined two VLANs on the network. One goes directly to the internet for GUEST, VLAN1, and

  • ODI WSDL Invocation - Avoiding direct input of Credentials

    Hi All, While invoking Scenarios through ODI Agent Wsdl in weblogic we need to give ODI Username and Password in the SOAP body. see the soap envelope below <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:odi="xmlns.o

  • TaskFlow Exception Handler Behavior

    Hi all, I have a question about taskflow exception handler. My customer is using method-call exception handler to display error detail as FacesMessage dialog in their taskflow. And they are now trying to find the way to call exception handler but not