How to add or remove data from one table to another in � jsp page

I have two tables on my jsp page.
On the fist table feed by a data base, u have in the first column radiobutton
second colum data
third columm data
on the second table feed by the data of the first table, u have in the first
columm checkbox
second colum data
this column data
u have two link, one link to add and another to remove
1 when u click one of the radiobutton of the fist table following by the click of the link add, u add the line into the second table.
2 when u click on one or two checkboxes of the second table following by a click on the link remove, u remove the line or lines checked.
Did somebody could send to me en example of code and give to me solution on way to make it. thank u.

rather than sending you the whole code, i would like
to see your code first, how far you implemented the
code ? and where are you getting problem, asking the
code like this is not a professional.
All the Best !******************************************************************************************************************************
that's what i have implements. U have a bean witch picked data in that the data base, and catch properties .
i describe to u how work the page.
when u chose or selected TypeDetoyer, it present to u the first table with all the toyer contains in the typeDeToyer, and presents the second table empty.
Secondly, u click a radio button to select � toyer of typeDeToyer and by clicking to the link ada, u feed the second table with the toyer selected.
the seconde table is fill with a checkbox.
inverse, when u check a check box or many of the second table and clicking on the link remove, u remove the selected lines.
the aim of all of this is to save in the data base
the second table, after saving the page is redirect to the modifying form.
I am waiting for ur answer.
Coul u send to me how u implements the part beetween the two tables
Thank s
<%@ page language="java" import="java.util.*"%>
<jsp:useBean id="nsimalenBean" scope="session" class="nsimalen.NsimalenBean" />
<jsp:useBean id="toyerBean" scope="session" class="nsimalen.ToyerBean" />
<jsp:useBean id="vectorLstTasks" scope="session" class="java.util.Vector" />
<jsp:useBean id="hashtableToyerSelected" scope="session" class="java.util.Hashtable"/>
<jsp:useBean id="hashtableRegimeFiscalToyers" scope="session" class="java.util.Hashtable"/>
<%
//nsimalen.NsimalenBean nsimalenBean=nsimalenBean();
///vectorLstTasks.removeElementAt(i);
String cVide="";
String typeOperation;
String monCodeNsimalen;
//String monCodeNsimalen=request.getParameter("txtCreateNsimalenFormCode");
String monNomNsimalen;
String maVilleNsimalen;
String monPaysNsimalen;
String monTypeDetoyerSelected;
String codeToyerSelected;
String codeToyerSelectedToAdd;
String codeToyerSelectedToRemove;
String currentlibelleTypeDetoyer=cVide;
String typeAction;
/// d�finition de variable dont les valeurs seront stock�es dans l'objet de session
if(request.getParameter("txtCreateNsimalenFormCode")!=null)
monCodeNsimalen=request.getParameter("txtCreateNsimalenFormCode");
else
monCodeNsimalen=cVide;
if(request.getParameter("txtCreateNsimalenFormNom")!=null)
monNomNsimalen=request.getParameter("txtCreateNsimalenFormNom");
else
monNomNsimalen=cVide;
if(request.getParameter("txtCreateNsimalenFormVille")!=null)
maVilleNsimalen=request.getParameter("txtCreateNsimalenFormVille");
else
maVilleNsimalen=cVide;
if(request.getParameter("selCreateNsimalenFormPays")!=null)
monPaysNsimalen=request.getParameter("selCreateNsimalenFormPays");
else
monPaysNsimalen=cVide;
if(request.getParameter("optCreateNsimalenFormTypeToyer")!=null)
{monTypeDetoyerSelected=request.getParameter("optCreateNsimalenFormTypeToyer");
currentlibelleTypeDetoyer=toyerBean.getLibelleTypedeToyer(monTypeDetoyerSelected);
else
monTypeDetoyerSelected=cVide;
if(request.getParameter("radioCreateNsimalenFormCodeToyers")!=null)
codeToyerSelectedToAdd=request.getParameter("radioCreateNsimalenFormCodeToyers");
else
codeToyerSelectedToAdd=cVide;
if(request.getParameter("radioCreateNsimalenFormCodeToyersRemove")!=null)
codeToyerSelectedToRemove=request.getParameter("radioCreateNsimalenFormCodeToyersRemove");
else
codeToyerSelectedToRemove=cVide;
if(request.getParameter("typeOperation")!=null)
typeOperation=request.getParameter("typeOperation");
else
typeOperation=cVide;
if(request.getParameter("typeAction")!=null)
typeAction=request.getParameter("typeAction");
else
typeAction=cVide;
// Stockage des valeurs dans l'objet
nsimalenBean.setCodePays(monPaysNsimalen);
nsimalenBean.setNomNsimalen(monNomNsimalen);
nsimalenBean.setVilleNsimalen(maVilleNsimalen);
nsimalenBean.setCodeNsimalen(monCodeNsimalen);
nsimalenBean.setDateCreation("12/12/2001");
// if typeOperation=Invalidation
// nsimalenBean.setDatad'invalidation
if(typeAction.equals("Save"))
nsimalenBean.validationCreation();
Vector validationErrors= nsimalenBean.getChampVide();
%>
<body>
<%
if (validationErrors!=null && validationErrors.size()!=0 )
for (int i=0; i<validationErrors.size();i++)
%>
<BR> Champs Invalides : <%=(String)validationErrors.elementAt(i)%>; <BR>
<%
else
if (hashtableToyerSelected!=null && hashtableToyerSelected.size()<=10)
nsimalenBean.insertRowNsimalen();
nsimalenBean.insertRowsToyersAssocieesNsimalen(hashtableToyerSelected);
if (hashtableToyerSelected!=null && hashtableToyerSelected.size()>=0)
%>
<BR> num Toyers max 10 <BR>
<%
if (hashtableToyerSelected!=null && hashtableToyerSelected.size()==0)
%>
<BR> vous devez au moins selectionner une toyer pour un nsimalen <BR>
<%
%>
<form method="post" name="CreateNsimalenForm" action="CreateNsimalen.jsp">
          <table cool width="681" height="424" usegridx usegridy showgridx showgridy gridx="16" gridy="16" border="0" cellpadding="0" cellspacing="0">
               <tr height="16">
                    <td width="16" height="423" rowspan="11"></td>
                    <td width="288" height="16" colspan="3"></td>
                    <td width="376" height="144" colspan="3" rowspan="5"></td>
                    <td width="1" height="16"><spacer type="block" width="1" height="16"></td>
               </tr>
               <tr height="32">
                    <td width="100" height="32" valign="top" align="left" xpos="16"><label><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Code :</b></font></label></td>
                    <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><input type="text" name="txtCreateNsimalenFormCode" size="24" value='<%=nsimalenBean.getCodeNsimalen()%>'></td>
                    <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
               </tr>
               <tr height="32">
                    <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Nom :</b></font></label></td>
                    <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><input type="text" name="txtCreateNsimalenFormNom" size="24" value='<%=nsimalenBean.getNomNsimalen()%>'></td>
                    <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
               </tr>
<input type="hidden" name="typeOperation" size="24" >
<input type="hidden" name="typeAction" size="24" >
               <tr height="32">
                    <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Ville :</b></font></label></td>
                    <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><input type="text" name="txtCreateNsimalenFormVille" size="24" value='<%=nsimalenBean.getNomVille()%>'></td>
                    <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
               </tr>
               <tr height="32">
                    <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Pays : </b></font></label></td>
                    <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><select name="selCreateNsimalenFormPays" size="1">
<option value="" ><b><font size="2" name="optCreateNsimalenFormPays"></font></b></option>
<%
//String cVide="";
Vector nsimalenLst = new Vector();
//strNomNsimalen=request.getParameter("txtSearchFormNom").trim();
nsimalenLst = nsimalenBean.getAllPays();
// Pour savoir la taille du vecteur
if(nsimalenLst!=null && nsimalenLst.size()!=0)
for(int i=0;i< nsimalenLst.size();i++)
Hashtable myrecord = (Hashtable)nsimalenLst.elementAt(i);
String monCodePays ="";
String monLibelle="";
monCodePays =(String)myrecord.get("NNAM_CODE");
monLibelle =(String)myrecord.get("NNAM_LIBELLE");
System.out.println("mon code pays= "+monCodePays+"i="+i+ " mon Libelle Pays="+monLibelle+"nsimalenLst.size() ="+nsimalenLst.size());
%>
<option value='<%=monCodePays%>' <%if(monCodePays.equals(monPaysNsimalen))
out.print("selected");%> ><b><font name="optCreateNsimalenFormPays" size="2"><%=monCodePays%></font></b></option>
                         <%}
%>
</select></td>
                    <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
               </tr>
               <tr height="16">
                    <td width="664" height="16" colspan="6" valign="top" align="left" xpos="16">
                         <hr width="644" size="2">
                    </td>
                    <td width="1" height="16"><spacer type="block" width="1" height="16"></td>
               </tr>
               <tr height="32">
                    <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Type de toyer :</b></font></label></td>
                    <td width="32" height="32"></td>
                    <td width="156" height="32" valign="top" align="left" xpos="148"><select name="optCreateNsimalenFormTypeToyer" size="1" onChange="javascript:document.CreateNsimalenForm.submit();">
<option value="" ><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"></font></b></option>
<%
//String cVide="";
Vector toyerLst = new Vector();
//strNomNsimalen=request.getParameter("txtSearchFormNom").trim();
toyerLst = toyerBean.getAllTypeDeToyers();
// Pour savoir la taille du vecteur
if(toyerLst!=null && toyerLst.size()!=0)
hashtableRegimeFiscalToyers = new Hashtable();
for(int i=0;i< toyerLst.size();i++)
Hashtable myrecord = (Hashtable)toyerLst.elementAt(i);
String monTypeToyer ="";
String monLibelleToyer="";
monTypeToyer =(String)myrecord.get("TTOY_CODE");
monLibelleToyer =(String)myrecord.get("TTOY_LIBELLE");
// System.out.println("mon code pays= "+monTypeToyer+"i="+i+ " mon Libelle Pays="+monLibelleToyer+"nsimalenLst.size() ="+toyerLst.size());
%>
<option value=<%=monTypeToyer%> <%if(monTypeToyer.equals(monTypeDetoyerSelected))
out.print("selected");%>><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><%=monLibelleToyer%></font></b></option>
                         <%}
}%>
</select></td>
                    <td width="376" height="32" colspan="3"></td>
                    <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
               </tr>
               <tr height="128">
                    <td width="288" height="128" colspan="3" valign="top" align="left" xpos="16">
                         <%if (!monTypeDetoyerSelected.equals(cVide))
//String cVide="";
Vector maTypeToyerDetailList = new Vector();
//strNomNsimalen=request.getParameter("txtSearchFormNom").trim();
maTypeToyerDetailList = toyerBean.getToyersDetailsSelected(monTypeDetoyerSelected);
// Pour savoir la taille du vecteur
if(maTypeToyerDetailList!=null && maTypeToyerDetailList.size()!=0)
%>
<table border="1" cellpadding="0" cellspacing="0" width="224" height="75">
          <tr height="19">
                                   <td height="19" width="20"></td>
                                   <td height="19" width="46"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Toyer</b></font></td>
                                   <td height="19" width="140"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Libell�</b></font></td>
                              </tr>
<%
{  hashtableRegimeFiscalToyers= new Hashtable();
System.out.println( " je passe dans le premier for");
for(int i=0;i< maTypeToyerDetailList.size();i++)
Hashtable myRecord = (Hashtable)maTypeToyerDetailList.elementAt(i);
System.out.println( " je passe dans le premier for 1");
String myCodeToyer ="";
String myLibelleToyer="";
String myTypeDeToyerCode="";
myCodeToyer =(String)myRecord.get("TOY_CODE");
myLibelleToyer =(String)myRecord.get("TOY_LIBELLE");
// myTypeDeToyerCode=(String)myRecord.get("TTOY_CODE");
System.out.println( " je passe dans le premier for 2");
Hashtable hashToyerCaracteristique = new Hashtable();
hashToyerCaracteristique.put("TOY_LIBELLE",myLibelleToyer);
hashToyerCaracteristique.put("TTOY_CODE",monTypeDetoyerSelected);
hashToyerCaracteristique.put("TTOY_LIBELLE",currentlibelleTypeDetoyer);
hashtableRegimeFiscalToyers.put(myCodeToyer,hashToyerCaracteristique);
System.out.println( " je passe dans le premier for 3");
%>
                              <tr height="19">
                                   <td height="19" width="20" align="center" valign="middle"><input type="radio" value='<%=myCodeToyer%>' name="radioCreateNsimalenFormCodeToyers"></td>
                                   <td height="19" width="46"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=myCodeToyer%></b></font></td>
                                   <td width="140" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=myLibelleToyer%></b></font></td>
                              </tr>
<%
%>
<%}%>
</table>
                    </td>
<% System.out.println( " je passe dans le premier for 4_1");
if (hashtableToyerSelected==null)
hashtableToyerSelected = new Hashtable();
System.out.println( " je passe dans le premier for 4_2");
if(hashtableToyerSelected!=null)
System.out.println( " je passe dans le premier for 4_3");
%>
<td width="376" height="128" colspan="3" valign="top" align="left" xpos="304">
                         <table border="1" cellpadding="0" cellspacing="0" width="355" height="117">
                              <tr height="38">
                                   <td height="38" width="32"></td>
                                   <td width="47" height="38"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Code</b></font></td>
                                   <td height="38" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Type de toyer</b></font></td>
                                   <td height="38" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>valeur par d�faut</b></font></td>
                              </tr>
<%
System.out.println( " je passe dans le premier for 3");
if(!codeToyerSelectedToAdd.equals(cVide) && typeOperation.equals("add"))
System.out.println( " je passe dans le premier for 3_a");
Hashtable hashToyerCaracteristique = (Hashtable)hashtableRegimeFiscalToyers.get(codeToyerSelectedToAdd);
hashtableToyerSelected.put(codeToyerSelectedToAdd,hashToyerCaracteristique);
System.out.println( " je passe dans le premier for 3_a_fin");
if(!codeToyerSelectedToRemove.equals(cVide) && typeOperation.equals("remove"))
System.out.println( " je passe dans le premier for 3_a");
System.out.println( "remove ");
System.out.println(codeToyerSelectedToRemove);
hashtableToyerSelected.remove(codeToyerSelectedToRemove);
if (hashtableToyerSelected.size()!=0)
for( Enumeration e=hashtableToyerSelected.keys();e.hasMoreElements();)
System.out.println("je rentre dans la boucle");
String codeToyer =(String)e.nextElement();
Hashtable hashToyerCaracteristique = (Hashtable)hashtableToyerSelected.get(codeToyer);
String libelleToyer =(String)hashToyerCaracteristique.get("TOY_LIBELLE");
String libelleTypeToyer =(String)hashToyerCaracteristique.get("TTOY_LIBELLE");
%>
<tr height="19">
                                   <td height="19" width="32" align="center" valign="middle"><input type="checkbox" value="<%=codeToyer%>" name="radioCreateNsimalenFormCodeToyersRemove"></td>
                                   <td width="47" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=codeToyer %></b></font></td>
                                   <td height="19" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=libelleTypeToyer %></b></font></td>
                                   <td height="19" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=libelleToyer %></b></font></td>
</tr>
<%
/* if (!codeToyerSelected.equals(cVide) && hashtableToyerSelected==null)
hashtableToyerSelected = new Hashtable();
if(hashtableToyerSelected!=null)
//insertion du code HTml pour afficher l'entete du tableau
if(operationType.equals("ajout"))
Hahstable toyersdetails = getToyersDetail(IdToyerSelected);
hashtableToyerSelected.put( IdToyerSelected, toyersdetails);
if(operationType.equals("remove"))
hashtableToyerSelected.remove(IdToyerSelected);
// avant d'afficher l'entete verifier qu'il ya des elements dans hashtableToyerSelected (
// hashtableToyerSelected.size!=0
//Affichage de la hashtable
for( Enumeration e=hashtableToyerSelected.keys();e.hasMoreElements;)
String IdToyers =(String)e.nextElement();
Hashtable ToyersDetails = (Hashtable) hashtableToyerSelected.get(IdToyers);
string defaultValue = (String)ToyersDetails.get(defaultValue);
// on fait la mise en page apres avoir recuperer tous les caracteristiques
%>
               <!--     <td width="376" height="128" colspan="3" valign="top" align="left" xpos="304">
                         <table border="1" cellpadding="0" cellspacing="0" width="355" height="117">
                              <tr height="38">
                                   <td height="38" width="32"></td>
                                   <td width="47" height="38"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Code</b></font></td>
                                   <td height="38" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Type de toyer</b></font></td>
                                   <td height="38" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>valeur par d&eacute;faut</b></font></td>
                              </tr>
                              <tr height="19">
                                   <td height="19" width="32" align="center" valign="middle"><input type="checkbox" value="checkboxValue" name="checkboxName"></td>
                                   <td width="47" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>J</b></font></td>
                                   <td height="19" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Sp&eacute;cifique</b></font></td>
                                   <td height="19" width="152"><b><font size="3" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2">Nuit</font></b></td>
                              </tr>
                              <tr height="19">
                                   <td width="32" align="center" valign="middle" height="19"><input type="checkbox" value="checkboxValue" name="checkboxName"></td>
                                   <td width="47" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>K</b></font></td>
                                   <td height="19" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Quantit&eacute;</b></font></td>
                                   <td height="19" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Kilo</b></font></td>
                              </tr> -->
                         </table>
                    </td>
                    <td width="1" height="128"><spacer type="block" width="1" height="128"></td>
               </tr>
               <tr height="51">
                    <td width="100" height="51" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Add</b></font></label></td>
                    <td width="188" height="51" colspan="2"></td>
                    <td width="224" height="51" valign="top" align="left" xpos="304"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Remove</b></font></label></td>
                    <td width="152" height="51" colspan="2"></td>
                    <td width="1" height="51"><spacer type="block" width="1" height="51"></td>
               </tr>
               <tr height="13">
                    <td width="664" height="13" colspan="6" valign="top" align="left" xpos="16">
                         <hr width="644" size="2">
                    </td>
                    <td width="1" height="13"><spacer type="block" width="1" height="13"></td>
               </tr>
               <tr height="39">
                    <td width="512" height="39" colspan="4"></td>
                    <td width="80" height="39" valign="top" align="left" xpos="528"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Save</b></font></label></td>
                    <td width="72" height="39" valign="top" align="left" xpos="608"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Fermer</b></font></label></td>
                    <td width="1" height="39"><spacer type="block" width="1" height="39"></td>
               </tr>
               <tr height="1" cntrlrow>
                    <td width="16" height="1"><spacer type="block" width="16" height="1"></td>
                    <td width="100" height="1"><spacer type="block" width="100" height="1"></td>
                    <td width="32" height="1"><spacer type="block" width="32" height="1"></td>
                    <td width="156" height="1"><spacer type="block" width="156" height="1"></td>
                    <td width="224" height="1"><spacer type="block" width="224" height="1"></td>
                    <td width="80" height="1"><spacer type="block" width="80" height="1"></td>
                    <td width="72" height="1"><spacer type="block" width="72" height="1"></td>
                    <td width="1" height="1"></td>
               </tr>
          </table>
          <p></p>
</form>
</body>
</html>

Similar Messages

  • MySQL move date from one table to another

    I was wondering if there is a MySQL command that will let me move a selected row of data from one table to another. both tables have the same columns and declaration type (one table is actually an archived table on old data)
    example
    I wasnt to move all data in Table1 where the date is greater than 30 days old to Table 2
    -- so the result should be...import all rows to Table 2 where the date is greater than 30 days old..and delete all date from Table 1 that is greater than 30 days.
    currently..I'm doing three process
    1) get all row that is greater than 30 days  
        "SELECT * FROM Table1 WHERE TO_DAYS(NOW()) - TO_DAYS(dateField) > 30"
    2) insert data into Table2
        while (res.hasNext())
              TableData data = ..... // .get row
              dataList.add(data);
              for (int i = 0; i < dataList.size(); i++){
                    pstm.setString.....
                    pstm.addBatch()
              pstm.executeBatch();
    3) delete data from Table1
        "DELETE FROM Table 1 WHERE  TO_DAYS(NOW()) - TO_DAYS(dateField) > 30"

    for this app..losing a few rows does not
    impact on how we analyze the data.That's what everyone always tells me too. But 99% of the time they come back and want to know why the cannot balance and/or validate the data between two runs taken only minutes from each other.
    I've seen people puzzle over data for days that they swear they ran the exact same utility for their tests, but they were in fact using live data, and additional data had accrued but since all they had to do was execute the a script without parameters (they didn't put in a stop time), they got two different answers and it always, and I mean always confuses people. Be safe, and put the option in for and end date/time, then when they waste days trying to figure out why the two different observations gave them different numbers, they cannot blame you (because you gave them the option)!
    My 2 cents for the day...

  • 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

  • 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

  • Move data from one table to another table

    Hi all,
    I  had a custom table called sales_data in that table there are  columns like JAn,FEB,upto DEC including other columns so in each month there is some data total data is  23000 count but each month has has specific data like JAn-2500,FEB-2000 like that it has total 23000 records
    My Requirement  is i have to move data from one table to another table that too if i will pass jan only jan data should move like that feb,march,.....
    in my table there is no month column i had get it from another table called gl_periods and by using cursor and case function i have written the code
    well while when i am inserting data am passing year,month as parameters but 23000 data is moving it should get like that.
    Please suggest me.its urgent
    Thank You

    Hi hamid,
                   Please go through the below procedure.
    CREATE OR REPLACE PROCEDURE APPS.copy_sales_to_forecast(p_fiscal_year varchar2,p_month number)
    IS
    CURSOR C1 IS select period_year,period_num,start_date,end_date from apps.gl_periods
                 where period_set_name='Accounting'
                 and   period_year=p_fiscal_year
                 and   period_num<=p_month;
    type type1 is table of xxc_forecast_data%rowtype;
    t1 type1;
    BEGIN
    FOR CREC IN C1 LOOP
    BEGIN
    DELETE FROM xxc_forecast2
    where fiscal_year = crec.period_year
      and attribute1='Copied From Sales to Forecast Table of Month '||crec.period_num;
    END;
    SELECT
      product_category           ,
      product_sub_category       ,
      product_line               ,
      product_style              ,
      item_number                ,
      item_description           ,
      customer_name              ,
      customer_number            ,
      sales_channel              ,
      null      ,
      CASE
        WHEN crec.period_num=1 THEN sales_amount_month1
        ELSE 0
      END Transaction_quantity_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_cost_month1
        ELSE 0
      END item_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_mtl_cost_month1
        ELSE 0
      END item_material_cogs_period1 ,
      CASE
        WHEN crec.period_num=1 THEN sales_mtl_ovhd_cost_month1
        ELSE 0
      END item_mtl_ovhd_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_res_cost_month1
        ELSE 0
      END item_resource_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_op_cost_month1
        ELSE 0
      END item_op_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_ovhd_month1
        ELSE 0
      END item_ovhd_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_units_month1
        ELSE 0
      END extended_amount_us_period1,
      CASE
        WHEN crec.period_num=2 THEN sales_amount_month2
        ELSE 0
      END Transaction_quantity_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_mtl_cost_month2
        ELSE 0
      END item_material_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_mtl_ovhd_cost_month2
        ELSE 0
      END item_mtl_ovhd_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_res_cost_month2
        ELSE 0
      END item_resource_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_op_cost_month2
        ELSE 0
      END item_op_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_ovhd_month2
        ELSE 0
      END item_ovhd_cogs_period2,
       CASE
        WHEN crec.period_num=2 THEN sales_units_month2
        ELSE 0
      END extended_amount_us_period2,
      CASE
        WHEN crec.period_num=3 THEN sales_amount_month3
        ELSE 0
      END Transaction_quantity_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_mtl_cost_month3
        ELSE 0
      END item_material_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_mtl_ovhd_cost_month3
        ELSE 0
      END item_mtl_ovhd_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_res_cost_month3
        ELSE 0
      END item_resource_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_op_cost_month3
        ELSE 0
      END item_op_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_ovhd_month3
        ELSE 0
      END item_ovhd_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_units_month3
        ELSE 0
      END extended_amount_us_period3,
      CASE
        WHEN crec.period_num=4 THEN sales_amount_month4
        ELSE 0
      END Transaction_quantity_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_mtl_cost_month4
        ELSE 0
      END item_material_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_mtl_ovhd_cost_month4
        ELSE 0
      END item_mtl_ovhd_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_res_cost_month4
        ELSE 0
      END item_resource_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_op_cost_month4
        ELSE 0
      END item_op_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_ovhd_month4
        ELSE 0
      END item_ovhd_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_units_month4
        ELSE 0
      END extended_amount_us_period4,
      CASE
        WHEN crec.period_num=5 THEN sales_amount_month5
        ELSE 0
      END Transaction_quantity_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_mtl_cost_month5
        ELSE 0
      END item_material_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_mtl_ovhd_cost_month5
        ELSE 0
      END item_mtl_ovhd_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_res_cost_month5
        ELSE 0
      END item_resource_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_op_cost_month5
        ELSE 0
      END item_op_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_ovhd_month5
        ELSE 0
      END item_ovhd_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_units_month5
        ELSE 0
      END extended_amount_us_period5,
      CASE
        WHEN crec.period_num=6 THEN sales_amount_month6
        ELSE 0
      END Transaction_quantity_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_mtl_cost_month6
        ELSE 0
      END item_material_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_mtl_ovhd_cost_month6
        ELSE 0
      END item_mtl_ovhd_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_res_cost_month6
        ELSE 0
      END item_resource_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_op_cost_month6
        ELSE 0
      END item_op_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_ovhd_month6
        ELSE 0
      END item_ovhd_cogs_period6,
       CASE
        WHEN crec.period_num=6 THEN sales_units_month6
        ELSE 0
      END extended_amount_us_period6,
      CASE
        WHEN crec.period_num=7 THEN sales_amount_month7
        ELSE 0
      END Transaction_quantity_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_mtl_cost_month7
        ELSE 0
      END item_material_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_mtl_ovhd_cost_month7
        ELSE 0
      END item_mtl_ovhd_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_res_cost_month7
        ELSE 0
      END item_resource_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_op_cost_month7
        ELSE 0
      END item_op_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_ovhd_month7
        ELSE 0
      END item_ovhd_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_units_month7
        ELSE 0
      END extended_amount_us_period7,
      CASE
        WHEN crec.period_num=8 THEN sales_amount_month8
        ELSE 0
      END Transaction_quantity_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_mtl_cost_month8
        ELSE 0
      END item_material_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_mtl_ovhd_cost_month8
        ELSE 0
      END item_mtl_ovhd_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_res_cost_month8
        ELSE 0
      END item_resource_cogs_period7,
      CASE
        WHEN crec.period_num=8 THEN sales_op_cost_month8
        ELSE 0
      END item_op_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_ovhd_month8
        ELSE 0
      END item_ovhd_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_units_month8
        ELSE 0
      END extended_amount_us_period8,
      CASE
        WHEN crec.period_num=9 THEN sales_amount_month9
        ELSE 0
      END Transaction_quantity_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_mtl_cost_month9
        ELSE 0
      END item_material_cogs_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_mtl_ovhd_cost_month9
        ELSE 0
      END item_mtl_ovhd_cogs_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_res_cost_month9
        ELSE 0
      END item_resource_cogs_period7,
      CASE
        WHEN crec.period_num=9 THEN sales_op_cost_month9
        ELSE 0
      END item_op_cogs_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_ovhd_month9
        ELSE 0
      END item_ovhd_cogs_period9,
       CASE
        WHEN crec.period_num=9 THEN sales_units_month9
        ELSE 0
      END extended_amount_us_period9,
      CASE
        WHEN crec.period_num=10 THEN sales_amount_month10
        ELSE 0
      END Transaction_quantity_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_mtl_cost_month10
        ELSE 0
      END item_material_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_mtl_ovhd_cost_month10
        ELSE 0
      END item_mtl_ovhd_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_res_cost_month10
        ELSE 0
      END item_resource_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_op_cost_month10
        ELSE 0
      END item_op_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_ovhd_month10
        ELSE 0
      END item_ovhd_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_units_month10
        ELSE 0
      END extended_amount_us_period10,
      CASE
        WHEN crec.period_num=11 THEN sales_amount_month11
        ELSE 0
      END Transaction_quantity_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_mtl_cost_month11
        ELSE 0
      END item_material_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_mtl_ovhd_cost_month11
        ELSE 0
      END item_mtl_ovhd_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_res_cost_month11
        ELSE 0
      END item_resource_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_op_cost_month11
        ELSE 0
      END item_op_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_ovhd_month11
        ELSE 0
      END item_ovhd_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_units_month11
        ELSE 0
      END extended_amount_us_period11,
      CASE
        WHEN crec.period_num=12 THEN sales_amount_month12
        ELSE 0
      END Transaction_quantity_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_mtl_cost_month12
        ELSE 0
      END item_material_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_mtl_ovhd_cost_month12
        ELSE 0
      END item_mtl_ovhd_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_res_cost_month12
        ELSE 0
      END item_resource_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_op_cost_month12
        ELSE 0
      END item_op_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_ovhd_month12
        ELSE 0
      END item_ovhd_cogs_period12,
        CASE
        WHEN crec.period_num=12 THEN sales_units_month12
        ELSE 0
      END extended_amount_us_period12,
      CASE
        WHEN crec.period_num=2 THEN sales_cost_month2
        ELSE 0
      END item_cogs_period2,
       CASE
        WHEN crec.period_num=3 THEN sales_cost_month3
        ELSE 0
      END item_cogs_period3,
       CASE
        WHEN crec.period_num=4 THEN sales_cost_month4
        ELSE 0
      END item_cogs_period4,
       CASE
        WHEN crec.period_num=5 THEN sales_cost_month5
        ELSE 0
      END item_cogs_period5,
      CASE
        WHEN crec.period_num=6 THEN sales_cost_month6
        ELSE 0
      END item_cogs_period6,
      CASE
        WHEN crec.period_num=7 THEN sales_cost_month7
        ELSE 0
      END item_cogs_period7,
       CASE
        WHEN crec.period_num=8 THEN sales_cost_month8
        ELSE 0
      END item_cogs_period8,
      CASE
        WHEN crec.period_num=9 THEN sales_cost_month9
        ELSE 0
      END item_cogs_period9,
       CASE
        WHEN crec.period_num=10 THEN sales_cost_month10
        ELSE 0
      END item_cogs_period10,
       CASE
        WHEN crec.period_num=11 THEN sales_cost_month11
        ELSE 0
      END item_cogs_period11,
      CASE
        WHEN crec.period_num=12 THEN sales_cost_month12
        ELSE 0
      END item_cogs_period12,
      a.fiscal_year   ,
      a.budget_entity  ,
      a.organization_code,
      a.customer_id  ,
      a.inventory_item_id ,
      NULL,
      NULL,
      a.created_by ,
      a.last_updated_by ,
      a.creation_date ,
      a.last_update_date ,
      'Copied From Sales to Forecast Table of Month '||crec.period_num,
      a.attribute2,
      a.attribute3 ,
      a.attribute4 ,
      a.attribute5 ,
      a.attribute6 ,
      a.attribute7 ,
      a.attribute8 ,
      a.attribute9 ,
      a.attribute10,
      a.attribute11,
      a.attribute12,
      a.attribute13,
      a.attribute14,
      a.attribute15
      bulk collect into t1
      FROM  xxc_sales_data a 
      where  a.fiscal_year          = crec.period_year
    having CASE
                 WHEN crec.period_num=1  THEN sum(sales_amount_month1)
                 WHEN crec.period_num=2  THEN sum(sales_amount_month2)
                 WHEN crec.period_num=3  THEN sum(sales_amount_month3)
                 WHEN crec.period_num=4  THEN sum(sales_amount_month4)
                 WHEN crec.period_num=5  THEN sum(sales_amount_month5)
                 WHEN crec.period_num=6  THEN sum(sales_amount_month6)
                 WHEN crec.period_num=7  THEN sum(sales_amount_month7)
                 WHEN crec.period_num=8  THEN sum(sales_amount_month8)
                 WHEN crec.period_num=9  THEN sum(sales_amount_month9)
                 WHEN crec.period_num=10 THEN sum(sales_amount_month10)
                 WHEN crec.period_num=11 THEN sum(sales_amount_month11)
                 WHEN crec.period_num=12 THEN sum(sales_amount_month12)
                END !=0;
      FORALL i IN t1.first .. t1.last
      INSERT INTO xxc_forecast2 VALUES t1(i);
    --commit;
    END LOOP;
    END;
    Thank You

  • Moving Data from one table to another table

    Hi,
    I've a requirement to move large volumes (few billions) of data from one table to another empty target table. The target has more number of attributes and may not have same attribute name as the source. Please let me know what's the best method using oracle to move data in this case?
    Thanks in Advance,
    Tom

    You should use nologging and parallelism options
    Please refer to Tom's answers:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:164612348068
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6407993912330
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Append data from one table to another.

    Hi,
    I want to insert/append some or all the data from one table to another table.
    For eg: Data from table table1 to be appended to table2 with the same constraints, indexes etc. The columns are same for both the tables.
    I am using 10g version 2.
    Please specify which method would be good for this process.
    Thanks
    Jafar

    INSERT INTO TABLE1 SELECT * FROM TABLE2;The above command would insert data into table2 and it also contain the old data.Is that right,
    Thanks
    Jafar

  • T code to Copy Data from one table to another table

    Hi,
    I want copy all data of one table to its copy table. Anyone knows transaction code to copy data from one table to another table.
    Regards,
    Jigar Thakkar.

    Hi
    Create a small program.
    Extract data from T1 - database table and put it in one internal table - itab1.
    loop the itab1 data .............
        insert itab1 into tab2.   (tab2 - second database table)
    endloop.
    try this....
    hope it works....

  • How to copy data from one table to another (in other database)

    Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
    ResultSet rset = stmt.executeQuery("select ...");
    But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.

    No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.

  • How do I transfer the data from one iPad to another

    How do I transfer all of the data from one ipad to another one?

    The best way IMO is to sync each iPad with your computer. Having all your stuff backed up on a computer is a good idea anyway. Just read how many folks here are trying to recover lost stuff that could easily be copied back from either backup or iTunes on the computer.
    Sync both iPads to the computer. Transfer all photos to the same computer. Then sync again selecting which items you want on each iPad.

  • Appending data from one table to another

    Hello
    How to append data from one table t1 to another table t2.
    t1 and t2 have the same structures .
    t2 contains already data so i don't want do delete it and create it as select * from t1.
    If there is a mean to add t1 content without altering t2 content.
    Thanks in advance

    insert into t2
      select * from t1

  • Flowing data from one Table to another

    I am new to Numbers and I am having a hard time figuring out how to flow a sum from one table into another table. Is this possible? Please help.
    Thanks
    E

    lassiegirl wrote:
    I am new to Numbers and I am having a hard time figuring out how to flow a sum from one table into another table. Is this possible? Please help.
    Hi lassiegirl,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Apple provides two excellent resources that I recommend be downloaded by all Numbers users, the Numbers '09 User Guide and the iWork Formulas and Functions User Guide. You'll find linke for both of them in the Help menu in Numbers.
    The first will give you an overview of Numbers and how it works—spend some time with the preface and the first chapter, browse the rest on a need to know basis when you're doing something new. The second is a reference, useful when you're trying to write a formula.
    To your question...
    You can copy the sum from one table to another.
    For the example formula beow, both Table 1 and Table 2 have one header row and one footer row, and a total of 21 rows each.
    If the SUM on Table 1 is in cell C21, and you want to include it in the SUM of column C in Table 2, you could transfer the sum to C1 in the header row of Table 2 with:
    C1:  =Table 1::C21
    In C21 of Table 2 (a Footer row), use any of these formulas:
    =SUM(C)+C1
    =SUM(Table 1::C)+SUM(C)
    =SUM(Table 1 :: C,C)
    The first calculates the sum of the cells in column C (of its own table—Table 2) and adds the value in C1, the total transferred from Table 1.
    The second returns the same result by calculating the sums of the two columns separately, then adding those sums.
    The third takes the single arguments of the two SUM statements in the second, and lists them as multiple arguments in a single SUM statement.
    Regards,
    Barry

  • Copying large amount of data from one table to another getting slower

    I have a process that copies data from one table (big_tbl) into a very big archive table (vb_archive_tbl - 30 mil recs - partitioned table). If there are less than 1 million records in the big_tbl the copy to the vb_archive_table is fast (-10 min), but more importantly - it's consistant. However, if the number of records is greater than 1 million records in the big_tbl copying the data into the vb_archive_tbl is very slow (+30 min - 4 hours), and very inconsistant. Every few days the time it takes to copy the same amount of data grows signicantly.
    Here's an example of the code I'm using, which uses BULK COLLECT and FORALL INSERST to copy the data.
    I occasionally change 'LIMIT 5000' to see performance differences.
    DECLARE
    TYPE t_rec_type IS RECORD (fact_id NUMBER(12,0),
    store_id VARCHAR2(10),
    product_id VARCHAR2(20));
    TYPE CFF_TYPE IS TABLE OF t_rec_type
    INDEX BY BINARY_INTEGER;
    T_CFF CFF_TYPE;
    CURSOR c_cff IS SELECT *
    FROM big_tbl;
    BEGIN
    OPEN c_cff;
    LOOP
    FETCH c_cff BULK COLLECT INTO T_CFF LIMIT 5000;
    FORALL i IN T_CFF.first..T_CFF.last
    INSERT INTO vb_archive_tbl
    VALUES T_CFF(i);
    COMMIT;
    EXIT WHEN c_cff%NOTFOUND;
    END LOOP;
    CLOSE c_cff;
    END;
    Thanks you very much for any advice
    Edited by: reid on Sep 11, 2008 5:23 PM

    Assuming that there is nothing else in the code that forces you to use PL/SQL for processing, I'll second Tubby's comment that this would be better done in SQL. Depending on the logic and partitioning approach for the archive table, you may be better off doing a direct-path load into a staging table and then doing a partition exchange to load the staging table into the partitioned table. Ideally, you could just move big_tbl into the vb_archive_tbl with a single partition exchange operation.
    That said, if there is a need for PL/SQL, have you traced the session to see what is causing the slowness? Is the query plan different? If the number of rows in the table is really a trigger, I would tend to suspect that the number of rows is causing the optimizer to choose a different plan (with your sample code, the plan is obvious, but perhaps you omitted some where clauses to simplify things down) which may be rather poor.
    Justin

  • Copying data from one table to another table thru java

    Hi
    I have to copy data from table emp in Database A to table emp in Database B. My input would be table name and number of rows to be fetched. these rows i need to insert in table B.
    The problem over here is I won't be having any info. of table emp i.e the number of columns it has and their type.
    So is their any way i can copy the data from one table to other without having the info abt the number of cols and their type.
    TIA

    Cross post - http://forum.java.sun.com/thread.jspa?threadID=5169293&messageID=9649839#9649839

Maybe you are looking for