MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 371

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 370
Exporting Data Using Bulk Insert
6-29
Tip When connecting to a database on a remote machine, you must write this file to
the remote machine. Microsoft SQL Server has problems trying to read files that are
not on the same machine as the instance of the database.
fid = fopen('c:\temp\tmp.txt','wt');
for i = 1:size(A,1)
fprintf(fid,'%10.2f \t %s \t %s \t %s \n',A{i,1},...
A{i,2},A{i,3},A{i,4});
end
fclose(fid);
6
Run the bulk insert.
e = exec(conn,['bulk insert BULKTEST from '...
'''c:\temp\tmp.txt''with (fieldterminator = ''\t'', '...
'rowterminator = ''\n'')']);
7
Confirm the number of rows and columns in BULKTEST.
e = exec(conn, 'select * from BULKTEST');
results = fetch(e)
results =
Attributes: []
Data: {10000x4 cell}
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: 'select * from BULKTEST'
Message: []
Type: 'Database Cursor Object'
ResultSet: [1x1 com.microsoft.sqlserver.jdbc.SQLServerResultSet]
Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]
Statement: [1x1 com.microsoft.sqlserver.jdbc.SQLServerStatement]
Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]
columnnames(results)
ans =
'salary','player','signed_date','team'
8
Close the connection.
Seitenansicht 370
1 2 ... 366 367 368 369 370 371 372 373 374 375 376 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare

Solac Elektrické varné konvice uživatelské příručky

Seznam produktů Solac Elektrické varné konvice obsahuje 1 uživatelské příručky pro 1 modelů. Všechny uživatelské příručky pdf jsou k dispozici ke stažení nebo prohlížení online.

Klepnutím na abecedu níže přejděte na úplný seznam modelů začínajících tímto písmenem

Modely Typ Dokumentu
KT5865
Návod k použití        Solac KT5865, 2 stránky