- Download the product delivery file.
- Extract the delivery file to find the data text file.
- Download the Create Table script.
- Open the Create Table script in a text editor and confirm that the table name is set to prop_hist_sales_change_log
- If a new format (FMT) file needs to be created, please follow the steps found in https://msdn.microsoft.com/en-us/library/ms191516.aspx.
- Issue the following
command:
Syntax:bcp <database_name>.dbo.<table_name> format null -c -f <path>\format_file_name.fmt -t "|" -S -T
-T: Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. If
-T
is not specified, the-U
and-P
parameters for username and password must be passed in order to log in.-t "|": Specifies that the format file will be generated using the pipe character as a delimiter.
Example:“bcp PAD.dbo.prop_hist_sales format nul -c -f C:\Property_Historical_Sales_202009\ change_hist_sales.FMT -t "|" –S –T ”
Note: Once the format file has been generated, \r needs to be removed from the file in
order to load data successfully.