我正在运行以下行的data.bat文件:
Rem Tis batch file will populate tables
cd\program files\Microsoft SQL Server\MSSQL
osql -U sa -P Password -d MyBusiness -i c:\data.sql
data.sql文件的内容为:
insert Customers
(CustomerID, CompanyName, Phone)
Values('101','Southwinds','19126602729')
还有8条相似的行用于添加记录。
当我跑这跟start
> run
> cmd
> c:\data.bat
,我收到此错误信息:
1>2>3>4>5>....<1 row affected>
Msg 8152, Level 16, State 4, Server SP1001, Line 1
string or binary data would be truncated.
<1 row affected>
<1 row affected>
<1 row affected>
<1 row affected>
<1 row affected>
<1 row affected>
另外,我显然是新手,但是Level #
,它的state #
意思和含义是什么,以及如何查找错误消息,例如上面的错误消息:8152?