308 Par t I EXAM PREPARATION 8 rows

308 Par t I EXAM PREPARATION 8 rows copied. Network packet size (bytes): 4096 Clock Time (ms.): total 1 In this example, all the defaults were used by just pressing the Enter key. This session of BCP results in two files being created: one is the output file, and the other is the format file, which in this case was named bcp.fmt. The data file that is created is the same you d get if you d used the -n for native format. Here s a format file: 8.0 4 1 SQLINT 1 4 1 PersonID 2 SQLINT 1 4 2 ProductID 3 SQLINT 1 4 3 QtyPurchased 4 SQLDATETIME 1 8 4 DatePurchased The first row of the format file is the version number of BCP. (If you want to see just the version number, by the way, you can use BCP -v at the command line.) The second row is the number of data rows that are in the file. The third row on to the end of the file is the actual layout of the file. The first column is the file column number. The second column is the data type. The third column is the prefix length, which is the number of bytes in the file that tell BCP how long the data field is, and is used only in native-format BCP. The fourth column is the number of bytes wide the data column is. The fifth column is the delimiter, which is what separates this column from the next column. Next is the server column order. Finally, the row ends up with the field name and the collation for the column. The file column number and server column number fields are used to do a couple of interesting things. First of all, if the table has columns that are in a different order than the file, you can manipulate the server column number to make it correct. Second, if you set the server column number to zero, then the column from the file gets skipped. Prefix length is used when copying data in SQL Server native mode. If the format file weren t native mode, then it would have SQLCHAR as the type for each column, rather than SQLINT or SQLDATETIME. The type is the type that is written (or read) from the file, not the database type. So if the type is SQLINT, then BCP is going to write out

If you looking for unlimited one inclusive web hosting plan please check unlimited web hosting website.

Comments are closed.