MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 563

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 562
fastinsert
7-133
Use fastinsert to export the data into the yearlySales table.
fastinsert(conn,tablename,colnames,data)
fastinsert appends the data as a new record at the end of the yearlySales table.
In Microsoft Access, view the yearlySales table to verify the results.
Close the cursor and database connection.
close(curs)
close(conn)
Insert Numeric Data
Connect to the data source dbtoolboxdemo. This data source identifies a Microsoft
Access database. This database contains the table salesVolume. This table contains the
column stockNumber and columns for the months of the year.
conn = database('dbtoolboxdemo','admin','admin');
Alternatively, you can use the native ODBC interface for an ODBC connection. For
details, see database.
Define the numeric matrix data that contains the sales volume data.
data = [777666,0,350,400,450,250,450,500,515,...
235,100,300,600];
Display the data in the salesVolume table before insertion.
curs = exec(conn,'select * from salesVolume');
curs = fetch(curs);
curs.Data
ans =
Columns 1 through 8
Seitenansicht 562
1 2 ... 558 559 560 561 562 563 564 565 566 567 568 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare