Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Will BULK INSERT truncate trailing spaces to fit in smaller field?

Posted on 2007-08-09
3
Medium Priority
?
306 Views
Last Modified: 2013-11-05
Dear Experts,

I have a three-byte character field I'd like to BULK INSERT into a two-byte character table field.  I'll be massaging the data beforehand such that only the first two bytes in the text file will actually be used, and the third byte will always be blank.  Does anyone know if BULK INSERT will be smart enough to do the load, ignoring the third byte?  (I don't care if it issues a warning...)

Thanks!
BrianMc1958
0
Comment
Question by:BrianMc1958
  • 2
3 Comments
 
LVL 12

Expert Comment

by:RubenvdLinden
ID: 19662040
What database server do you use?

To give you something of an answer in advance, most database servers will truncate your last byte.
0
 

Author Comment

by:BrianMc1958
ID: 19662078
SQL Server 2000 and 2005.  Is that what you meant?
0
 
LVL 12

Accepted Solution

by:
RubenvdLinden earned 2000 total points
ID: 19662121
Yes, that was what I meant.

SQL Server will truncate the data for you, no problem.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Use this step by step method when setting up QuickBooks Online. They will allow you to explore the various features of the advanced settings available to you.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question