StumbleUpon  Del.icio.us  Facebook  Reddit  Add to diigo  


Follow - Monx007
Article Time Stamp: 08 April 2012, 20:18:24 GMT+7

Microsoft SQL (MS SQL): Syntax Error And Solutions




When I imported data from MS Access into Microsoft SQL, I got an error message just like this:

Error at Destination for Row number 448153. Errors encountered so far in this task: 1. Insert error, column 13 ('BIRTH', DBTYPE_DBTIMESTAMP), status 6: Data overflow. Invalid character value for cast specification.



::Solutions::

It seems that at BIRTH's column may contain null values. This caused those following error. You may want to change the BIRTH column type into DateTime then do the import process again.





String or binary data would be truncated



::Solutions::

This problem occurs when you are trying to insert a value (string or binary) that exceeds fields length.

Example:
If you have field_a with 4 digit length as varchar type. Then you had insert a value "ADVENTURE". Microsoft SQL engine will display the error message "String or binary data would be truncated".

If you've set ANSI_WARNINGS OFF, Microsoft SQL will truncated the records into ADVE, and then continue on to the next records.

But remember:
- ANSI_WARNINGS must be ON for queries that involves linked servers, indexed views and indexes on computed columns. Thus setting ANSI_WARNINGS OFF can cause the query to fail to run much slower.
- Putting SET ANSI_WARNINGS OFF in a procedure will trigger a recompilation of the procedure, so it might be better to set it before calling the procedure.

Article Source: Monx Digital Library

Copyrighted@ Monx Digital Library, otherwise stated
Use of our service is protected by our Terms of Use



 Back To Previous Page ...  



 

 

 

AQWorlds Nulgath Secret Walkthrough