Quantcast
Channel: SQLServerCentral » SQL Server 2012 » SQL Server 2012 - T-SQL » Latest topics
Viewing all articles
Browse latest Browse all 4901

BCP comma delimited file into a table

$
0
0
I must be overlooking something really simple, but I am stuck. keep getting the error: Error = [Microsoft][SQL Server Native Client 11.0]BCP host-files must contain at least one columnHere is my bcp:bcp mydatabase.dbo.stg_assess_value in AVALUE.TXT -S myserver -U myusername -P mypassword -f Assess_Value.fmtFormat file: Assess_Value.fmt7.0 2 1 SQLCHAR 0 4 "," 1 tax_year 2 SQLCHAR 0 5 "\r" 2 fips_codeInput file: AVALUE.TXT2013,220672013,220682013,220692013,220602013,22061SQL Server table: mydatabase.dbo.stg_assess_valueCREATE TABLE [dbo].[stg_assess_value]( [tax_year] [decimal](4, 0) NOT NULL, [fips_code] [decimal](5, 0) NOT NULL)I am using SQL Server 2012, but I am not doing anything version specific.Any help would be appreciated. Thanks.

Viewing all articles
Browse latest Browse all 4901

Trending Articles