Database Toolbox |
Replacing Existing Data in a Database from MATLAB
In this example, you update existing data in the database with exported data from MATLAB. Specifically, you update the date you previously imported into the Avg_Freight_Cost
table.
You learn to use these Database Toolbox functions:
If you want to see or copy the functions for this example, or if you want to run a similar set of functions, use the M-file matlab\toolbox\database\dbdemos\dbupdatedemo.m
:
Avg_Freight_Cost
table is incorrect and instead should be 19-Jan-2002
. Type
newdata
, which contains the data you will export. Type
where
statement and assign it to the variable whereclause
. The record to be updated is the record that has 20-Jan-2002 for the Calc_Date
.
For more information about working with strings in MATLAB, see Characters and Strings in the MATLAB Programming documentation.
Calc_Date
is 20-Jan-2002.
Avg_Freight_Cost
table to verify the results.
Exporting Data from MATLAB to a New Record in a Database | Exporting Multiple New Records from MATLAB |
© 1994-2005 The MathWorks, Inc.