Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: Decimal poi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 11192 of 11409
Post > Topic >>

Re: Decimal point and comma

by Erland Sommarskog <esquel@[EMAIL PROTECTED] > Jun 30, 2008 at 10:26 PM

(KiP.Kolodziejczyk@[EMAIL PROTECTED]
) writes:
> I 'd like to insert (via "bulk insert")  between 10-20 files (about
> 300MB each)  into one table.
> The problem is that in input files decimal point is written as "," and
> without leading zeros (i.e.: ",45"), and sever uses ".".
> 
> So I 've got an "type mismatch" error.
> I can't re-build input file, as well as I can't change configuration
> of mssql sever.
> Is there any option to force the server to convert decimal point while
> im****ting?
>  Maybe "file format" option in bulk insert, or another way of
> im****t...?
 
With BULK INSERT you are out of luck. With BCP, it is possible that the
-R option can help you. This option causes BCP to honour regional
settings.
You would need to have regional settings where , is the delimiter, but 
if you are located in Poland, I guess you have.

I need to add the discalimer that I am not sure that this will work. I
have
had problems with the -R options to work in the past, as I recall. And
if you have a mix of decimal comma and decimal point, you really have a 
problem.


-- 
Erland Sommarskog, SQL Server MVP, esquel@[EMAIL PROTECTED]
 Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 




 3 Posts in Topic:
Decimal point and comma
KiP.Kolodziejczyk@[EMAIL   2008-06-30 02:56:54 
Re: Decimal point and comma
"Dan Guzman" &l  2008-06-30 07:43:38 
Re: Decimal point and comma
Erland Sommarskog <esq  2008-06-30 22:26:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 15:23:55 CDT 2008.