Copying Table Rows

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Tutorials > "ZooDB" Database > Updating Database Data >

Copying Table Rows

In the tblMedicalTreatments table, the zookeepers in our tutorial zoo keep records about the medical treatments of the zoo animals. If a disease occurs repeatedly, you can copy a previous entry in this table and append it to the result grid as a new row.

tab_result-medical-treatment

In the screenshot above, you can see that the zoo's hill mynah (AnimalD 5004) suffered from the Newcastle Disease already twice. In this section of the tutorial, you will copy a previous treatment and add it to the medical treatments record.

 

 

To copy a row and append it to the result grid:

1.In the Online Browser, right-click the tblMedicalTreatments table and select Edit Data from the context menu.
2.In the Result window, right-click into the fifth row and select Selection | Row from the context menu.
3.Right-click again and select Copy selected cells from the context menu.
4.Right-click anywhere in the result grid and select Paste as new rows from the context menu.
5.Double-click the "TreatmentDate" cell of the new row and enter the new date of the treatment.

tab_result-copy-row

6.If required, change the VetID table if a different veterinarian is responsible for the treatment.
7.Click the ic_commit button to actually add the new row to the database.

© 2019 Altova GmbH