Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 SQL Query Analyzer vs. isal

Author  Topic 

jw2523
Starting Member

1 Post

Posted - 2007-09-12 : 08:54:34
Dear Colleagues,

While I was bulk-loading a data file using a stored procedure, I got the following issue:

When I used SQL Query Analyzer, I received the folliwng error message:

Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.

The command I used is:

exec stored_procedure_name parameters

The reason why is that in the data file, a field in one record is larger than the field in the table.

But when I used isql, the data were loaded successfully without any error message. The string in the field of the record, of course, was truncated.

The command I used is:

isql -S servername -E -d databasename -Q "exec stored_procedure_name parameters"

I'm using SQL Server 2000 hosted on a Windows 2000 server.

My questions:

1. Why did I get the error message when I used query analyze, but no error when I used isql?

2. Is there anyway that I can force isql ro raise the same error?

Please let me know if you need more information.

I'd greatly appreciate your help.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-12 : 23:49:35
Tried with -o option?
Go to Top of Page
   

- Advertisement -