Submit data from a jsp to another jsp in other window

Hi all,
In my project I call a popup jsp where I do a browse of a database. The selected data must be showed in the first jsp. I can't do this with a href because the popup window must be closed. Is there a solution for this problem?
Jef

I have on my main page:
window.name= "main"; (in javascript)
<input type="text" name="txtPicUrl" value="" size="50"> (in body)
And the next on the popup page:
<form name="frmImage" target="main">
<input type="text" name="txtPath" size="125"/>
</form>
why does this not work. I find this solution in another forum and it should work. Did I forget something.
Thanks
Jef

Similar Messages

  • Transfer data from the JSP to other sites

    I want to transfer the data from a jsp to a external site.
    where the data required for the user name and password in the site are available in the JSP.
    (Here the external site is not under our control.........)
    From this JSP data should be able to transfer to that site and press OK button.
    I must be able to login to that site when i enter data in a JSP.
    Help me...........

    Hi Sunil.
    Function MRM_INVOICE_CHECK doesn't exist in system 4.6c. Also I've searched for it in ECC 5 and I got the same result. Are you sure about the name of the function?
    From the function group MRMC, I found this:
    MRM_BADI_INVOICE_CHECK    
    MRM_DUPLICATE_INVOICE_CHECK
    I haven't still check them. But for what I know, the second one (...DUPLICATE...) processes a control to avoid a double entry of the invoice, I not sure it will work. I'll let you know.
    Thanks for answering.
    Sebas

  • How to capture the data from a JSP form

    Hi
    I have a JSP form, My task is to capture the data from a JSP and submit to Data Base. for example I have the field like
    Enter Table name to be created in data base: The table name is to be captured by a servlet and by that table name, table should be created in the data base.
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????

    Get the entered value from the jsp into servlet using request.getParameter("enteredTableName"). it will return the String,pass this table name to execute query using JDBC connection and statement objects.
    -cheers Ram

  • How to retrieve the data from a jsp page for print?

    i have a dynamic jsp file which will get the data at runtime.I have a print button in the jsp.When i chick the print button it should capture the data from the jsp and print it as LANDSCAPE mode. Now i am using Java Api for this
              Following code is a working sample which prints some data in LANDSCAPE mode..This is working fine....How can i modify this to get the data from a jsp?....I am using weblogic workshop for development
              package Awtjava;
              //working example
              import java.awt.*;
              import java.awt.print.*;
              public class testPrint implements Printable {
              private static String s[];
              private static Font f;
              private static int nLines;
              public static void main (String arg[]){
              s = new String[10];
              f = new Font("Arial", Font.PLAIN, 11);
              int i;
              s[0] = "This is a printer test";
              for (i=1; i<10; i++){
              s[i] = "The next line";
              nLines = 10;
              testPrint.printa();
              public static void printa(){
              System.out.println("public static void printa () ");
              PrinterJob pj=PrinterJob.getPrinterJob();
              Book b = new Book();;
              PageFormat pf = new PageFormat();
              pf = pj.defaultPage(pf);
              b.append(new testPrint(), pf, 2);
              pj.setPageable (b);
              try{
              if (pj.printDialog()){
              pj.print();
              catch (Exception e) { System.out.println ("Error"); }
              public int print (Graphics g1, PageFormat pf, int n){
              System.out.println("public int print");
              int x,y,i,fa,fh;
              FontMetrics fm;
              Graphics2D g = (Graphics2D) g1;
              pf.setOrientation(PageFormat.LANDSCAPE);
              fm = g.getFontMetrics (f);
              fa = fm.getMaxAscent();
              fh = fm.getHeight();
              x = (int)pf.getImageableX();
              y = (int)pf.getImageableY() + fa;
              g.setFont (f);
              g.setColor(Color.black);
              if (n==1){
              for (i=0; i<10; i++){
              g.drawString (s, x, y);
              y += fh;
              return PAGE_EXISTS;
              else {
              for (i=10;i<10; i++){
              g.drawString (s[i], x, y);
              y += fh;
              return PAGE_EXISTS;
              Hope you will reply soon...
              Thanks in advance
              Maria

    Hey, I got a doubt that who will call the print method in the same program and what about the g.drawString() it is showing any output effect. Finally how the variable n will get initializing to 0 and 1 for two times respectively. Can u please elaborate on this...

  • How to submit data from multiple Input Ports in single SUBMIT button  click

    Hi,
    I am in SPS8.
    What exactly steps I need to perform to submit data from multiple Input Ports.
    I couldn't able to submit One input Form and one Input Table to BAPI data service in single SUBMIT button click.
    I debugged the VC application in SPS8.
    While debugging, I found that when I click the SUBMIT button in the Input Form, Only data in that Input
    form are being passed to the BAPI, But not the Table Form data.
    If I click on the SUBMIT button in another Input Table, Only data from that table is being passed to the BAPI, but not the Input form data.
    Essentially I need to submit both of them in one SUBMIT button.
    Thanks,
    Ramakrishna

    Ramakrishna,
    From the word document that you sent to me the steps you are missing to map the appropriate information into the BAPI is first you are not mapping all data rows into the table input port. To do this double click on the input table view and change your selection mode from single to multiple. Then when you click on your link between the BAPI and your input table you will see a new option appears under data mapping "Mapping Scope" select All Data Rows.
    That's the first part of the problem to get the BAPI to recognize both the inputs coming from the form and the table eliminate the submit button from the form. Drag and drop a link from the output port of the table view to the Input port of the BAPI. Double click on the link between the BAPI and the table view and open the expressions editor for the two fields:
    1/ Automatic Source
    2/ SKIP_ITEMS_WITH_ERROR
    On the hierarchical folder structure on the right expand expand the Data Fields node to find the fields from the form and map them accordingly.
    Now when you hit the submit button on your table it should pass the BAPI all the parameters from both the form and the table.
    Hope this helps,
    Cheers,
    Scott

  • Transferring the data from one system to another system.

    Hi All,
       I need to transfer the material master data from one system(e.g - dev1)
    to another system (e.g - dev2).
      front end application is BSP.
      if the user enters the material number 1 to 20 and if he presses the submit
      button, the entire data should be transferred to another system.
      This transferring of data should be done in background.
      1. which method we should opt for this ? either ALE or any other method like XI.
      2. Is there any standard bapi function module to transfer the material master from one system to another system.
      3.  whether this above transferring can be done thru XI and which will be best approach for doing this?
    Points will be awarded.
    Regards,
    Vinoth.

    Hi amole,
       Thanks for the reply.
        How to use lsmw for transferring fo data from one system to another system.?
       whether to download the data from one system in excel or notepad and again to upload into other system?
       can u explain me.
    Regards,
    vinoth.

  • How can I Move data from one column to another in my access table?

    I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
    I understand how to drop a column or add a column, how do I transfer data from one column to another.
    Here is my trial code:
    <cfquery name="qQueryChangeColumnName" datasource="#dsn#">
      ALTER TABLE leaderboard
      UPDATE leaderboard SET  points2 = points3
    </cfquery>
    Unfortunately, I get the following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
    How can I transfer my data with the alter table method?

    I looked up the Access SQL reference (which is probably a
    good place to start when having issues with Access SQL), and
    it suggests you probably need a WHERE clause in there.
    I agree the documentation is a good place to start. But you should not need a WHERE clause here.
    Too few parameters. Expected 1.
    If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message..

  • Adding Data From One Table to Another

    Now, this doesn't strike me as a particularly complex problem, but I've either strayed outside the domain of Numbers or I'm just not looking at the problem from the right angle. In any case, I'm sure you guys can offer some insight.
    What I'm trying to do is, essentially, move data from one table to another. One table is a calendar, a simple two column 'date/task to be completed' affair, the other is a schedule of jogging workouts, i.e, times, distances. Basically, I'm trying to create a formula that copies data from the second table onto the first but only for odd days of the week, excepting Sundays (and assuming Monday as the start of the week). Now, this isn't the hard part, I can do that. The problem comes when I replicate the formula down the calendar. Even on the days when the 'if' statement identifies it as an 'even day', the cell reference to the appropriate workout on the second table is incremented, so when it comes to the next 'odd day', it has skipped a workout.
    I can't seem to see any way of getting it to specifically copy the NEXT line in the second table, and not the corresponding line.
    This began as a distraction to try and organise my running so I could see at a glance what I had to do that day and track my progress, but now it's turned into an obsession. SURELY there's a solution?
    Cheers.

    Hi Sealatron,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Several possible ways to move the data occur to me, but the devil's in the details of how the data is currently arranged.
    Is it
    • a list of three workouts, one for each of Monday, Wednesday and Friday, then the same three repeated the following week?
    • an open-ended list that does not repeat?
    • something else?
    Regards,
    Barry

  • Data from a frame to another (bis)

    Hi,
    I have a first Frame DataPanelCli, when I use the button "Rechercher" in the class ButtonPanelCli, I find the informations of my company in the class FindRecCli. After when I use the button "STRUCTURE", I use the JFrame StructRecCli BUT I CAN NOT show the data coming from my first Frame.
    Here is the programme, could you please help me.
    regards.
    Thierry
    import java.util.*;
    import java.sql.*;
    import java.io.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.awt.Container;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.*;
    import java.lang.String;
    public class AppClient extends JFrame {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         public AppClient() {
              //titre fen�tre
              super( " APPLICATION CLIENT");
              // set up GUI environment
              Container p = getContentPane();
              screenvarcli = new DataPanelCli();
              msgout = new JTextArea( 8, 40);
              p.setLayout( new FlowLayout() );
              p.add( new JScrollPane(screenvarcli) );
              p.add( new JScrollPane(msgout) );
              // DB Connection
              try {
                   String url = "jdbc:odbc:Access";
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   // Cr�ation d'une liaison
                   dbconn = DriverManager.getConnection(url, "dba", "sql" );
                   msgout.append("Connection successful !\n");
              catch (ClassNotFoundException cnfex) {
                   cnfex.printStackTrace();
                   msgout.append("Connection unsuccessful\n" +
                        cnfex.toString());
              catch (SQLException sqlex) {
                   sqlex.printStackTrace();
                   msgout.append("Connection unsuccessful\n" +
                        sqlex.toString());
              catch (Exception excp) {
                   excp.printStackTrace();
                   msgout.append(excp.toString());
              // Complete GUI
              ButtonPanelCli controls = new
              ButtonPanelCli(dbconn, screenvarcli, msgout);
              p.add(controls);
    //          RadioButtons rb = new RadioButtons(dbconn, screenvarcli, msgout);
    //          p.add(rb);
              setSize(500,475);
              show();
         public static void main( String args[]) {
              AppClient cli = new AppClient();
              cli.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                             System.exit(0);
    class DataPanelCli extends JPanel {
         JTextField ICCliFact, INSociete,
              ILAdresseA, ICPostal, ILLocalite, ICPays;
         JLabel LCCliFact, LNSociete,
              LLAdresseA, LCPostal, LLLocalite, LCPays;
         public DataPanelCli() {
              //Label Panel
              JPanel labelPanelCli = new JPanel();
              labelPanelCli.setLayout( new GridLayout(6, 1));
              LNSociete = new JLabel( "Nom ", 0);
              labelPanelCli.add(LNSociete);
              LCCliFact = new JLabel( "Num�ro Client", 0);
              labelPanelCli.add(LCCliFact);
              LLAdresseA = new JLabel( "Adresse ", 0);
              labelPanelCli.add(LLAdresseA);
              LCPostal = new JLabel( "Code Postal ", 0);
              labelPanelCli.add(LCPostal);
              LLLocalite = new JLabel( "Localite ", 0);
              labelPanelCli.add(LLLocalite);
              LCPays = new JLabel( "Pays ", 0);
              labelPanelCli.add(LCPays);
              //TextField Panel
              JPanel screenvarcliPanel = new JPanel();
              screenvarcliPanel.setLayout( new GridLayout(6, 1));
              INSociete = new JTextField("Enter Name - click RECHERCHER", 20);
              screenvarcliPanel.add(INSociete);
              ICCliFact = new JTextField( 20);
              screenvarcliPanel.add(ICCliFact);
              ILAdresseA = new JTextField( 20);
              screenvarcliPanel.add(ILAdresseA);
              ICPostal = new JTextField( 20);
              screenvarcliPanel.add(ICPostal);
              ILLocalite = new JTextField( 20);
              screenvarcliPanel.add(ILLocalite);
              ICPays = new JTextField( 20);
              screenvarcliPanel.add(ICPays);
              // Accessibility Section - relate labels and text fields
              // for use by assistive technologies
              LNSociete.setLabelFor( INSociete);
              LLAdresseA.setLabelFor( ILAdresseA);
              LCPostal.setLabelFor( ICPostal);
              LLLocalite.setLabelFor( ILLocalite);
              LCPays.setLabelFor( ICPays);
              setLayout( new GridLayout( 1, 2));
              add( labelPanelCli);
              add( screenvarcliPanel);
    class ButtonPanelCli extends JPanel {
         public ButtonPanelCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              setLayout( new GridLayout( 2 ,0 ));
              JButton findcli = new JButton( "Rechercher" );
              findcli.addActionListener( new FindRecCli( dbc, scv, msg ));
              add( findcli );
              JButton addcli = new JButton( "Ajouter" );
              addcli.addActionListener( new AddRecCli( dbc, scv, msg ));
              add( addcli );
              JButton clearcli = new JButton( "Clear" );
              clearcli.addActionListener( new ClearScreenCli( scv ));
              add( clearcli );
              JButton printcli = new JButton( "Impression" );
    //          printcli.addActionListener( new PrintRecCli( dbc, scv, msg ));
              add( printcli );
              JButton structcli = new JButton( "STRUCTURE" );
              structcli.addActionListener( new StructRecCli( dbc, scv, msg ));
              add( structcli );
              JButton commerccli = new JButton( "COMMERCIAL" );
    //          commerccli.addActionListener( new CommercRecCli( dbc, scv, msg ));
              add( commerccli );
              JButton financli = new JButton( "FINANCIER" );
    //          financli.addActionListener( new FinanRecCli( dbc, scv, msg ));
              add( financli );
    class ClearScreenCli implements ActionListener {
         private DataPanelCli screenvarcli;
         public ClearScreenCli( DataPanelCli scv ) {
              screenvarcli = scv;
         public void actionPerformed( ActionEvent e ) {
              screenvarcli.ICCliFact.setText( "" );
              screenvarcli.INSociete.setText( "" );
              screenvarcli.ILAdresseA.setText( "" );
              screenvarcli.ICPostal.setText( "" );
              screenvarcli.ILLocalite.setText( "" );
              screenvarcli.ICPays.setText( "" );
    // Recherche Ajout Maj record
    // FIND NUMERO CLIENT
    class FindRecCli implements ActionListener {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         public FindRecCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              dbconn = dbc;
              screenvarcli = scv;
              msgout = msg;
         public void actionPerformed( ActionEvent e ) {
              try {
                   String rechnom = new String();
                   rechnom = screenvarcli.INSociete.getText();
              if ( !rechnom.equals( "" )) {
                   Statement statement = dbconn.createStatement();
                   String query = "SELECT * " +
                        "FROM Cli_fact, Adresse " +
                        "WHERE Cli_fact.n_societe_c = '" + rechnom + "' " +
                        "AND c_adresse = c_cli_fact " +
                        "AND c_type_adr = '02'";
    //                    "WHERE n_societe_c = '" +
    //                    rechnom + "' ";
                   msgout.append( "\nSending query " +
                   dbconn.nativeSQL( query ) + "\n" );
                   ResultSet rs = statement.executeQuery( query );
                   display( rs );
                   statement.close();
              else
                   screenvarcli.INSociete.setText( "Entrer le NOM de Soci�t� ");
              catch ( SQLException sqlex ) {
                   msgout.append( sqlex.toString() + sqlex.getMessage() );
         // Display results of query
         public void display( ResultSet rs ) {
              try {
                   rs.next();
                   int recordNumber = rs.getInt( 1);
                   if ( recordNumber != 0 ) {
                        screenvarcli.ICCliFact.setText( String.valueOf(recordNumber) );
                        screenvarcli.INSociete.setText( rs.getString(2));
                        screenvarcli.ILAdresseA.setText( rs.getString(35));
                        screenvarcli.ILLocalite.setText( rs.getString(32));
                        screenvarcli.ICPostal.setText( rs.getString(31));
                        screenvarcli.ICPays.setText( rs.getString(33));
                        msgout.append( "\n Enregistrements trouv�s!!!!!!!\n" );
                   else
                        msgout.append( "\nPas d'enregistrements trouv�s\n" );
              catch ( SQLException sqlex ) {
                   msgout.append( "\n*** Nom de Soci�t� pas dans la data Base ***\n" );
    // ADD CLIENT
    class AddRecCli implements ActionListener {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         public AddRecCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              dbconn = dbc;
              screenvarcli = scv;
              msgout = msg;
         public void actionPerformed( ActionEvent e ) {
              try {
              Statement statement = dbconn.createStatement();
              String rechnom = new String();
              rechnom = screenvarcli.INSociete.getText();
              if ( !rechnom.equals( "" )) {
                   String query = "INSERT INTO cli_fact (" +
                   "n_societe_c) VALUES ('" +
                   screenvarcli.INSociete.getText() + "')";
                   msgout.append( "\nSending query " +
                   dbconn.nativeSQL( query ) + "\n" );
                   int result = statement.executeUpdate( query );
                   if ( result == 1 ) {
                   // read just inserted rec to obtain c_cli_fact field
                   // needed to place STRUCTURE COMMERCIAL FINANCIER
                   msgout.append( "\nInsertion r�ussie\n" );
                   try {
                   query = "SELECT * FROM cli_fact WHERE n_societe_c='" +
                        rechnom + "'";
                   ResultSet rs = statement.executeQuery( query );
                   rs.next();
                   screenvarcli.ICCliFact.setText(String.valueOf(rs.getInt(1)));
                   catch ( SQLException sqlex ) {
                   msgout.append( sqlex.toString() );
              else {
                   msgout.append( "\nInsertion NON r�ussie\n" );
                   screenvarcli.INSociete.setText( "" );
              else
              msgout.append( "\nEntrer au moins le non de soci�t� puis press NOUVEAU\n" );
              statement.close();
              catch ( SQLException sqlex ) {
              msgout.append( sqlex.toString() );
              screenvarcli.INSociete.setText("Nom de soci�t� existe d�j� -- reenter");
    // STRUCTURE
    //class StructRecCli extends JFrame implements ActionListener {
    class StructRecCli implements ActionListener {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         private boolean firsttime = true;
         public StructRecCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              super( " APPLICATION CLIENT STUCTURE " );
              dbconn = dbc;
              screenvarcli = scv;
              msgout = msg;
         public void actionPerformed( ActionEvent e) {
              if (firsttime) {
                   Container cnt = getContentPane();
                   cnt.setLayout( new FlowLayout() );
                   StruCliBox ob = new StruCliBox();
                   cnt.add( ob );
         screenvarcli.INSociete.getText();
                   ButtonPanelStr controls = new
                   ButtonPanelStr(dbconn, screenvarcli, msgout);
                   cnt.add(controls);
                   setSize(500, 475);
                   firsttime = false;
              show();
    class StruCliBox extends JPanel {
         JTextField ICCliFact, INSociete,
              ILAdresseA, ICPostal, ILLocalite, ICPays;
         JLabel LCCliFact, LNSociete,
              LLAdresseA, LCPostal, LLLocalite, LCPays;
         public StruCliBox() {
              //Label Panel
              JPanel s = new JPanel();
              s.setLayout( new GridLayout(6, 1));
              LNSociete = new JLabel( "Nom ", 0);
              s.add(LNSociete);
              LCCliFact = new JLabel( "Num�ro Client", 0);
              s.add(LCCliFact);
              LLAdresseA = new JLabel( "Adresse ", 0);
              s.add(LLAdresseA);
              LCPostal = new JLabel( "Code Postal ", 0);
              s.add(LCPostal);
              LLLocalite = new JLabel( "Localite ", 0);
              s.add(LLLocalite);
              LCPays = new JLabel( "Pays ", 0);
              s.add(LCPays);
              //TextField Panel
              JPanel screenvarcliPanel = new JPanel();
              screenvarcliPanel.setLayout( new GridLayout(6, 1));
              INSociete = new JTextField( 20);
              screenvarcliPanel.add(INSociete);
    //          String rechnom = new String();
    //          screenvarcli.INSociete.getText();
              ICCliFact = new JTextField( 20);
              screenvarcliPanel.add(ICCliFact);
              ILAdresseA = new JTextField( 20);
              screenvarcliPanel.add(ILAdresseA);
              ICPostal = new JTextField( 20);
              screenvarcliPanel.add(ICPostal);
              ILLocalite = new JTextField( 20);
              screenvarcliPanel.add(ILLocalite);
              ICPays = new JTextField( 20);
              screenvarcliPanel.add(ICPays);
              // Accessibility Section - relate labels and text fields
              // for use by assistive technologies
    //          LNSociete.setLabelFor( INSociete);
              LLAdresseA.setLabelFor( ILAdresseA);
              LCPostal.setLabelFor( ICPostal);
              LLLocalite.setLabelFor( ILLocalite);
              LCPays.setLabelFor( ICPays);
              setLayout( new GridLayout( 1, 2));
              add( s);
              add( screenvarcliPanel);
    //          setLayout(new FlowLayout() );
    //          add(s);     
    class ButtonPanelStr extends JPanel {
         public ButtonPanelStr( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              setLayout( new GridLayout( 1 ,0 ));
              JButton addstr = new JButton("Ajouter");
    //          addstr.addActionListener( new AddStructure( dbconn, screenvarcli, msgout, ob));
              add( addstr );
              JButton majstr = new JButton("Mise � jour");
    //          majstr.addActionListener( new MajStructure( dbconn, screenvarcli, msgout, ob));
              add( majstr );
              JButton clestr = new JButton("Clear");
    //          clestr.addActionListener( new CleStructure( dbconn, screenvarcli, msgout, ob));
              add( clestr );
              JButton prnstr = new JButton("Impression");
    //          prnstr.addActionListener( new PrnStructure( dbconn, screenvarcli, msgout, ob));
              add( prnstr );
         // Fermeture de l'application
    //     protected void processWindowEvent(WindowEvent e) {
    //          if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    //               System.exit(0);

    To get data from one frame to another, either create one frame with a reference to the other one so it can discover the data in it, or create a static variable in one of your classes that both frames can access

  • Moving time-dependant data from one table to another (archiving)

    Hello all
    I would like to know if there's an easier solution or a "best practice" to move data from one table to another. The context of this issue can be found within "archiving".
    More concretely: we have an application that uses several tables to log information to.
    These tables are growing like crazy, and we would like to keep only "relevant" data in those tables, so I was thinking about moving data from these tables that have been in there for, say 2 months, to "archiving" tables.
    I figured there must be some kind of "best practice" to get this done.
    I have already written a procedure that loops the table that has the time indicator and inserts the records from the normal tables into the archive tables (and afterwards delete this data), but it seems to be taking ages to get it done.
    Thanks in advance!
    Message was edited by:
    timschraepen

    There is nothing to do with PL/SQL.
    You can refer below links:
    http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96524/c12parti.htm
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10739/partiti.htm#i1006727

  • Insert old missing data from one table to another(databaase trigger)

    Hello,
    i want to do two things
    1)I want to insert old missing data from one table to another through a database trigger but it can't be executed that way i don't know what should i do in case of replacing old data in table_1 into table_2
    2)what should i use :NEW. OR :OLD. instead.
    3) what should i do if i have records exising between the two dates
    i want to surpress the existing records.
    the following code is what i have but no effect occured.
    CREATE OR REPLACE TRIGGER ATTENDANCEE_FOLLOWS
    AFTER INSERT ON ACCESSLOG
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    V_COUNT       NUMBER(2);
    V_TIME_OUT    DATE;
    V_DATE_IN     DATE;
    V_DATE_OUT    DATE;
    V_TIME_IN     DATE;
    V_ATT_FLAG    VARCHAR2(3);
    V_EMP_ID      NUMBER(11);
    CURSOR EMP_FOLLOWS IS
    SELECT   EMPLOYEEID , LOGDATE , LOGTIME , INOUT
    FROM     ACCESSLOG
    WHERE    LOGDATE
    BETWEEN  TO_DATE('18/12/2008','dd/mm/rrrr') 
    AND      TO_DATE('19/12/2008','dd/mm/rrrr');
    BEGIN
    FOR EMP IN EMP_FOLLOWS LOOP
    SELECT COUNT(*)
    INTO  V_COUNT
    FROM  EMP_ATTENDANCEE
    WHERE EMP_ID    =  EMP.EMPLOYEEID
    AND    DATE_IN   =  EMP.LOGDATE
    AND    ATT_FLAG = 'I';
    IF V_COUNT = 0  THEN
    INSERT INTO EMP_ATTENDANCEE (EMP_ID, DATE_IN ,DATE_OUT
                                ,TIME_IN ,TIME_OUT,ATT_FLAG)
         VALUES (TO_NUMBER(TO_CHAR(:NEW.employeeid,99999)),
                 TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'),       -- DATE_IN
                 NULL,
                 TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'),      -- TIME_IN
                 NULL ,'I');
    ELSIF   V_COUNT > 0 THEN
    UPDATE  EMP_ATTENDANCEE
        SET DATE_OUT       =  TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_OUT,
            TIME_OUT       =   TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_OUT
            ATT_FLAG       =   'O'
            WHERE EMP_ID   =   TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
            AND   DATE_IN <=  (SELECT MAX (DATE_IN )
                               FROM EMP_ATTENDANCEE
                               WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
                               AND   DATE_OUT IS NULL
                               AND   TIME_OUT IS NULL )
    AND   DATE_OUT  IS NULL
    AND   TIME_OUT IS NULL  ;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END ATTENDANCEE_FOLLOWS ;
                            Regards,
    Abdetu..

    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;Regards,
    Christian Balz

  • Transfer data from one database to another without identities but keep the relation b/w PK and Foreign key

    Hi,
    I need to transfer data from one database to another database (both are identical databases). 
    1. Not transferring identity columns (primary keys). the destination table might have the same key.
    2. keep the PK's and FK's relation b/w parent and child table
    3. I have 4 levels 
    Example: tableA (col1 int identity(1,1) , col2, col3)
    tableB (col1 int identity(1,1) ,
    col2 , col3) -- col2 has the foreign key relation with tableA.col1
    tableC (col1 int identity(1,1) ,
    col2, col3) -- col2  has the foreign key relation with tableB.col1
    tableD (col1 int identity(1,1) , col2, col3) -- col2  has the foreign key relation with tableC.col1
    please advise me.
    Thanks in advance

    Try the below:
    /********************************SAMPLE TARGET***************************************************************/
    Use MSDNSamples
    create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
    Insert into TableA(name) Select 'R1'
    Insert into TableA(name) Select 'R2'
    create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
    Insert into TableB(name,LevelValueID) Select 'Childname1',1
    /********************************SAMPLE TARGET***************************************************************/
    /********************************SAMPLE SOURCE***************************************************************/
    Use Sample
    create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
    Insert into TableA(name) Select 'C1'
    Insert into TableA(name) Select 'C2'
    create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
    Insert into TableB(name,LevelValueID) Select 'Kidname1',1
    /********************************SAMPLE SOURCE***************************************************************/
    USe MSDNSamples
    /********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
    --Migration table
    Create table Mg_TableA(LevelValueId int, NewValueId int)
    /********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
    /********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
    MERGE INTO TableA
    USING sample.dbo.TableA AS tv
    ON 1 = 0
    WHEN NOT MATCHED THEN
    INSERT(name) Values(tv.name)
    Output tv.levelValueId ,inserted.LevelValueid INTO
    Mg_TableA;
    /********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
    /********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
    Insert into TableB (name,LevelValueID)
    Select A.name,B.NewValueId From sample.dbo.TableB A
    Inner join Mg_TableA B on A.LevelValueID = B.LevelValueId
    /********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
    /********************************TEST THE VALUES***************************************************************/
    Select * From TableA
    Select * From Mg_TableA
    Select * From TableB
    /********************************TEST THE VALUES***************************************************************/
    Drop table TableB,Tablea,Mg_TableA
    Use Sample
    Drop Table TableB,Tablea

  • Move data from one cube to another cube

    Hi,
    I am on BW 3.5 and I have moved the data from one cube to another cube and found that the number of records in the original cube does not match to the newly created cube. for eg. if the original cube contains 8,549 records then the back up cube contains 7,379 records.
    Please help me on what I need to look on and if in case the records are getting aggregated then how do I check the aggregating record.
    Regards,
    Tyson

    Dear tyson m ,
    check with any update rules in ur transfer.If so check in it.
    Just go through these methods for making transfer from one cube to another cube fully without missing data.
    Update rules method
    if it's updated from ods, you can create update rules for cube2 and update from ods
    or you can try datamart scenario
    cube1 right click 'generate export datasource'
    create update rules for cube2, assign with cube1
    rsa1->source system->bw myself, right click 'replicate datasource'
    rsa1-> infosource -> search 8cube1 name
    (if not get, try right click root note 'infosource'->insert lost node(s)
    from that infosource, you will find assigned with datasource, right click and 'create infopackage', schedule and run.
    Copy from
    While creating the new cube give the cube name in the "Copy from" section. It would copy all the characteristics and Key figures. It would even copy the dimensions and Navigational attributes
    Another option is:
    The steps for copying the contents of one cube to another:
    1. Go to Manage -> Recontruct of the new cube.
    2. Select the "selection button"(red , yellow, blue diamond button).
    3.In the selection screen you can give the technical name of the old cube, requests ids you want to load, from & to date.
    4.Execute and the new cube would be loaded.
    Its all that easy!!!!!!
    Refer this link:
    Copying the structure of an Infocube
    Reward if helpful,
    Regards
    Bala

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

    The geniusbar told me what to do, I understood but there is still a problem for me >:/ It's not showing up though. Like "device."  Nothing is happening, and I tried as soon as I got home. Then after half an hour, then an hour, then 3 hours. My problem is that it's not showing up! It's stuck in recovery mode! There's still like 25% battery. So I have no idea why.

  • How do I transfer data from one iPhone to another?

    How do I transfer data from one iPhone to another?

    If your old device is an Apple using iOS 5 or later, and you have an iCloud account, you can transfer all your saved messages, email accounts, photos, notes, and other personal settings to your new iPhone.
    Here's how...
    Connect your old Apple device to WiFi and to a power source.
    Back it up to iCloud by going to Settings > iCloud > Storage & Backup and toggling iCloud Backup on. The time it takes to ba ckup depends on how much data you have and on the speed of your internet connection.
    iCloud backs up your device once a day. If it needs backing up before you transfer to your new iPhone 5, tap Back Up Now in Settings > iCloud > Storage & Backup. Do not start transferring before the backup is finished.
    Turn on your new iPhone and complete the setup by selecting your language and country, and choose whether to enable Location Services. When prompted, choose your WiFi network.
    When prompted to set up, choose Restore from iCloud Backup, tap Next, and enter your Apple ID and password.
    Select the backup of your old device and tap Restore. Wait until the device has finished restoring from the backup.
    When the restore process is complete, your iPhone will restart and be ready to use.
    Connect your iPhone 5 to iTunes to sync data not contained in the backup (such as music, videos, apps, and so on). You can choose the data that are synced by clicking the syncing tabs in iTunes.

Maybe you are looking for

  • How to add new column in report painter

    Hi Experts, I want to add new column in report painter which as to calculate the previous column . value in the new column should be the precentage of previous column existing on left side...

  • Adobe Photoshop Lightroom 3.4 Problem

    Hi, I have windows 7 ultimate installed on my system. The problem that I am facing is..when I export images from Adobe Photoshop Lightroom 3.4, I can not use the folder to which I have exported the images. Explorer.exe starts using more than1.5Gb RAM

  • Folio builder

    Folio builder has stopped logging in, says a software update is required but software is right up to date. Worked fine yesterday. Any ideas Ian

  • Reverse the inventory posting to earilier date

    hi, we have createed some deliveries sucefully with eralier dates i.e dec 2008,why because corresponding sales orders r created on dec '08, but for one delivery by mistake GI Date has taken as current date ie jan 2009, so that we have reverseed the P

  • Jpa (toplink) + oc4j: oracle.oc4j.rmi.OracleRemoteException

    Hi Brains, :P I'm trying create a query with javax.persistence.Query im my Stateless in the OC4J. Query query = em.createQuery("my string query"); This line throw the exception oracle.oc4j.rmi.OracleRemoteException: 2009-03-06 13:02:38.484 ERROR J2EE