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 ?

Similar Messages

  • How to create a new Table

    Hi,
    I need to create a new Table from null,
    is the example in the javadoc of com.sun.rave.web.ui.component.TableBase ok ?
    If yes where are the Messages and Clean classes ?
    Thanks.

    Thanks, found : Creator Tip: Displaying two dimensional array in the table component

  • Creating a new table, to replace an old one

    Hi experts;
    I'm looking for an advice about what I'm going to do.
    This is the situation;
    I got a production table with more than 1,000,000,000 of records.
    the queries to this table are too slow, and I decided to create a new table, to replace this one.
    But my doubts are:
    How can I create a new table including the same structure as the old one, and with some data.
    I got this query:
    Create new_table as select * from old_table
    where trans_year = '2012';
    I know with this I got the structure, but what about indexes?
    My other doubt is, to replace the old one, just I drop it, and rename the new one?
    This table belong to an oracle 9i DB.
    Thanks for your comments.
    Al

    >
    How can I create a new table including the same structure as the old one, and with some data.
    I got this query:
    Create new_table as select * from old_table
    where trans_year = '2012';
    I know with this I got the structure, but what about indexes?
    My other doubt is, to replace the old one, just I drop it, and rename the new one?
    This table belong to an oracle 9i DB.
    >
    You could export the table metadata and then import it as a renamed table. That would keep the indexes, triggers, constraints.
    But for one table it may be easier to just recreate the indexes and other objects.
    For the query you may want to disable logging of the INSERT.
    Create table new_table NOLOGGING as select * from old_table where trans_year = '2012';
    -- set the table back to logging mode
    ALTER table new_table LOGGING;Then you can drop the old table (if you already have a backup of it) and rename the new one to the old name.
    The create will perform much better with NOLOGGING but because it is not logged you will not be able to recover the data from the log files.
    So you should take a backup afterward.

  • How to create / populate new table in MaxDB?

    Dear All,
    I'm a newbies in using MaxDB and still learning on it.
    I've installed MaxDB Database Manager 7.6
    I need help from all the experts here on the following "dumb" questions from me.
    1) I can't create, modify or delete any table / data with Database Manager, am I right?
    2) Should I start creating / populating tables with sqlcli or dbmcli? I was informed that I should use sqlcli instead or dbmcli.
    3) What is the syntax for me to create new table, as well as add, modify and delete data within it?
    Please assist to provide some guidance or at least point me to the right direction interm of documentation available.
    THANK YOU VERY MUCH!!!
    Much appreciated,
    -Deric-

    > I've installed MaxDB Database Manager 7.6
    >
    > I need help from all the experts here on the following "dumb" questions from me.
    >
    > 1) I can't create, modify or delete any table / data with Database Manager, am I right?
    Nope - the Database Manager is not able to to "sql-stuff".
    You would want to use the Database Studio or the SQL Studio for that.
    But as you're starting to learn anyhow, just go for the more modern Database Studio.
    It combines the features of Database Manager and SQL Studio into one tool.
    > 2) Should I start creating / populating tables with sqlcli or dbmcli? I was informed that I should use sqlcli instead or dbmcli.
    Why would you want to learn SQL by working with command line tools?
    Really, go for the Database Studio instead.
    For simple SQL stuff via command line you may use sqlcli.
    > 3) What is the syntax for me to create new table, as well as add, modify and delete data within it?
    > Please assist to provide some guidance or at least point me to the right direction interm of documentation available.
    You definitively need
    a) read the tutorial in the [documentation|http://maxdb.sap.com/doc/7_7/d0/3e345709c044d4a954e3a8d0be0867/content.htm]
    and
    b) get a SQL learning book to really understand the concepts behind relational databases and the query language.
    Learning SQL is not about knowing how to type the commands.
    Most users learn the commands rather quickly.
    But fully understanding the set-approach of relational databases and how to create and use those databases correctly is often not learned.
    So make sure not to fall into this trap!
    regards,
    Lars

  • How to create a "News" Content area with an effective date

    I have a requirement to create a content area such that each item which is uploaded
    will have an effective viewing date range. I know I can create a custom item type
    and prompt for the Start View Date, and the End View Date.
    Questions...
    1. How do I 'filter' the displayed content so that the 'news' item only show up
    if the current System Date is between the Start/End View dates ?
    2. Exception, the Content Manager should be able to see the entire news content
    items regardless of the system date ?
    Page parameter mapping seems like a partial solution, but I don't see how to
    create the folder filter predicate like "where SYSDATE between view_start and view_end.

    Why not use Publish Date and Expiry Date?

  • Can you create a new table from an Excel spreadsheet

    It would be GREAT if there was a way to use SQL Developer to take an Excel Spreadsheet, and create a new table based on it - does anyone know if that's possible?
    Thanks,
    Brad Blake

    Excellent - yes, from the thread on the SQLDeveloper website, it looks like you will be able to create a new table from an .xls file - very cool!
    Does anyone know when version 1.1 is supposed to be coming out?
    --Brad                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How can I create a new table from a filed cell?

    Every time that I fill a row of cells I want to creat a new table with the content of that cells.
    How can I do it?
    Donw here it´s the example.
    From the top table, I want to fill these rows, and everytime that it´s done, I want that a new table apears like the cells under.
    There is any Way to do it?
    In the Spanish version of Number I found in the references formulas, one formula called "DIRECTION" that describes to do this.
    But I found no way to do it.
    The above formula it´s this:
    =DIRECCION(row; collumn; type of direction; stile of direction; table name)
    Anyone can help me?
    I really need this solution.

    Otto,
    Based on the syntax you quoted for that function, the english equivalent is "Address". It doesn't create a Table, but rather it creates an Address that references a Cell, in the form of a String. The common, and only, use that I am aware of for Address is to use it as the parameter for INDIRECT. For example: INDIRECT(ADDRESS)) will produce a reference to a table cell, but it will not produce a table.
    Jerry

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • How can I create a new table in a MySQL database in MVC 5

    I have an MVC 5 app, which uses MySQL hosted in Azure as a data source. The point is that inside the database, I want to create a new table called "request". I have already activated migrations for my database in code. I also have the following
    code in my app.
    Request.cs: (inside Models folder)
    public class Request
    public int RequestID { get; set; }
    [Required]
    [Display(Name = "Request type")]
    public string RequestType { get; set; }
    Test.cshtml:
    @model Workfly.Models.Request
    ViewBag.Title = "Test";
    <h2>@ViewBag.Title.</h2>
    <h3>@ViewBag.Message</h3>
    @using (Html.BeginForm("SaveAndShare", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
    @Html.AntiForgeryToken()
    <h4>Create a new request.</h4>
    <hr />
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
    @Html.LabelFor(m => m.RequestType, new { @class = "col-md-2 control-label" })
    <div class="col-md-10">
    @Html.TextBoxFor(m => m.RequestType, new { @class = "form-control", @id = "keywords-manual" })
    </div>
    </div>
    <div class="form-group">
    <div class="col-md-offset-2 col-md-10">
    <input type="submit" class="btn btn-default" value="Submit!" />
    </div>
    </div>
    @section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    HomeController.cs:
    [HttpPost]
    public ActionResult SaveAndShare(Request request)
    if (ModelState.IsValid)
    var req = new Request { RequestType = request.RequestType };
    return RedirectToAction("Share");
    The point is that, I want the user to fill the form inside the Test view and click submit, and when the submit is clicked, I want a new entry in the new table to be created. But first of course I need to create the table. Should I create it using SQL query
    through MySQL workbench? If yes, then how can I connect the new table with my code? I guess I need some DB context but don't know how to do it. If someone can post some code example, I would be glad.
    UPDATE:
    I created a new class inside the Models folder and named it RequestContext.cs, and its contents can be found below:
    public class RequestContext : DbContext
    public DbSet<Request> Requests { get; set; }
    Then, I did "Add-Migration Request", and "Update-Database" commands, but still nothing. Please also note that I have a MySqlInitializer class, which looks something like this:
    public class MySqlInitializer : IDatabaseInitializer<ApplicationDbContext>
    public void InitializeDatabase(ApplicationDbContext context)
    if (!context.Database.Exists())
    // if database did not exist before - create it
    context.Database.Create();
    else
    // query to check if MigrationHistory table is present in the database
    var migrationHistoryTableExists = ((IObjectContextAdapter)context).ObjectContext.ExecuteStoreQuery<int>(
    string.Format(
    "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '__MigrationHistory'",
    // if MigrationHistory table is not there (which is the case first time we run) - create it
    if (migrationHistoryTableExists.FirstOrDefault() == 0)
    context.Database.Delete();
    context.Database.Create();

    Hello Toni,
    Thanks for posting here.
    Please refer the below mentioned links:
    http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
    http://social.msdn.microsoft.com/Forums/en-US/3a3584c4-f45f-4b00-b676-8d2e0f476026/tutorial-problem-deploy-a-secure-aspnet-mvc-5-app-with-membership-oauth-and-sql-database-to-a?forum=windowsazurewebsitespreview
    I hope that helps.
    Best Regards,
    Sadiqh Ahmed

  • How to Create the new Field ( Table - Row) in SAP B1

    I have a scenario in which the Purchase calculation is based on LR, so for that we have to add new field in Purchase  Document. that filed is not available in form setting.  kindly let me know how to Create a new field in Purchase document.
    Thanks

    Hi,
    I have adding new & existing forms and creating User Defined Field in row. example on adding a field in an existing Form and its corresponding to the database, including user input validations?
    I want to add a new field in the detail section ( row area ) of a Production Document, and save it to database and read it back when the document is opened.
    Thanks.
    Syed Waqar Khurshid

  • Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.

    Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.
    when you copy n paste into a new table, all the cell sizes are changed.
    is there a way to put in a new table from your templates into an existing file, different to the standard very basic ones in insert table.
    I look forward to your answers.  Your help is very much appreciated.
    Also how do you search for question answers already written in this support area please.

    Hi Jason,
    In Numbers 3, you can select a whole table by clicking once in the table to make it active, then click once on the "bull's eye" at the top left.
    Now copy and paste. All formatting (and any cell content) is pasted intact. In Numbers 2.3 (Numbers '09) it is a little different for selecting a whole table. But I won't go into that unless you are using Numbers '09. Please reply.
    I don't like the look of the tables in Insert Table. I keep custom tables in My Templates. I have set Numbers > Preferences > General > For New Documents > Use template: (name of my favourite custom template)
    That opens when I launch Numbers, or ask for a new document (command n). Note that if you follow this preference setting, then Menu > File > New From Template Chooser (for another template) requires you to hold down the option key in that menu.
    Regards,
    Ian.
    Message was edited by: Yellowbox. All formatting (and any cell content) is pasted intact.

  • How To Create the New Advance Table in standered RN?

    Hi Gurus,
    How to create the New Advance Table in stander RN?
    My requirement is slandered RN Having 1 Advance Table that advance table retrieve the two types of data 1.FUNC 2.BEHV Now My Client is asking split the data
    1) FUNC Data
    2) BEHV Data.
    Now i did first one through Vo Extension Filter the FUNC Data. now i really struck the Another part plz help me i cont go the next step....pl z tell me what are prerequisites are needed and how to go next step plz help me Gurus.
    Regards,
    Srini

    Hi,
    I have adding new & existing forms and creating User Defined Field in row. example on adding a field in an existing Form and its corresponding to the database, including user input validations?
    I want to add a new field in the detail section ( row area ) of a Production Document, and save it to database and read it back when the document is opened.
    Thanks.
    Syed Waqar Khurshid

  • Create a new table style based on an existing table in a document

    Hi,
    In a document I'm working on, there is a specific table. It is made in the past by a colleague, and it has a very suitable format.
    Therefore I would like to use the layout of this table on all future tables in my document (or even in others).
    Is there an option to select my table, and create a new table style with it, so that I can use it over and over again? That would be very helpful.
    I'm working in MS Word, MS Office Professional Plus 2010, on a Windows 7 64-bit OS.
    Best regards, Sietske
    Ps.: I know
    a question like this was already asked, but the answer was quite dissatisfying (because it was not answering the question)
    Pps: Note that I'm now creating a new table style from scratch, so an answer to the above question is not that urgent, but it would still be nice to know for future use.

    you can  use format painter
    i hope that you already know about it.
    Nope, not the right answer. With Format Painter, you can copy the format of the table, but you can't create a new Table Style with it. I am looking for a solution as well.

  • Crystal Reports XI - How  to create a new field using a formula field

    I'm quite new to CR, but have been learning quickly!
    I would like to know how to automatically create a new record/field based on another field in that row...
    I have a report showing the following data:
    Run Code     Start KM    Stop KM    Status 
    H2                 100            150           Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    The status is generated by comparing the 'Start KM' and 'Stop KM' against fields in another table called 'Start Odo' and 'Stop Odo'
    In this example...
    H2 has 'Start Odo' and 'Stop Odo' values of 90 to 160, therefore there is still 90-100 to check.  The 'Start KM' and 'Stop KM'  is equal to the 'start Odo' and 'stop Odo' for S3, therefore it shows completed.
    My question is how do you create a formula field, which will add an entire row...displaying the values 90-100.
    I've been trying to use a conditional check in the 'Start KM' column, that sees if status is equal to partial than if start km is greater than start odo (Which is the reference km) then display the value of start odo in the new row. I'm stuck at how to create a new row.
    I want the final result to look like this...
    Run Code     Start KM    Stop KM    Status 
    H2                  90              100         Partial
    H2                 100             150          Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    Any suggestions would be more than appreciated

    Hi Adi
    Looking at your examples it seems that you want to add a row to the existing recordset (rows fetched from the database).
    If it is the case (even if based on a formula) then you can not do it within crystal. Crystal is designed to display data and ideally it should not generate the new data.
    However, as per your requirement you can try to add this logic at database end. May be a command object within Crystal Reports can help you.
    Let me know if you do not understand anything.
    Regards
    Nikhil

  • 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,
    >

Maybe you are looking for

  • I just got another ipod 5th generation and its working like a 4th generation. Help please?

    Origionally i cracked the screen on my 5th generation ipod. Apple gave me a new 5th gemneration and when i reatored the backup dat it startred working like a 4th generation. i downloaded iOS 7 and know i wont let me update. it says error code 3014. w

  • Mantain G/L Balance

    hi all, is there any way in sap through which we can mantain the G/L A/c Balance? i.e if an a/c balance goes below the particular balance the system should not allow the user to make any outgoing payment. I am an abap consultant.......so plz tell me

  • Problems with java full-screen

    Hi, When I try to add a TextField or TextArea to the full screen window the TextFields or TextAreas don't show up. Could someboby help my solving this problem?

  • Collection query for specific SCCM client version - Parameters?

    Good morning, I need to upgrade my older clients as I recently upgraded SCCM to SP2.  I can't seem to find the parameters in query builder to populate a collection with a specific SCCM client version.  Can anyone help me out or point me in the right

  • Where's my exported GB song

    Hi, I have problems to export GB songs to iTunes. I did it a few month ago and it worked fine. But now I tried to export a new song from GB to iTunes, but I can't find the song in iTunes. GB works when I try to eport, then iTunes openes but nothing e