ADO: Locale And Decimal Separator

Dec 13, 2007

Hi

I am working on an application that uses ADO to retrieve data from SQL Server 2005. It may be used against various instances of databases and each instance contains floating point values that may used comma (',') or point ('.') as decimal. This is where the problem occurs. Depending on the database instance the strings containing floating point values also use comma or point as decimal separator.

Is there a way that by which I can force the database to return floating points with decimals separated by point? Doing a prelimimary google search, I found hints of including "Locale Identifier" in the connection string such as




Code Block
Provider=SQLOLEDB.1;Persist Security Info=True;Locale Identifier=0x0409;User ID......




but even if I specify US English locale, it does not remove the commas in floating point data.

Kind regards
Jens Ivar

View 1 Replies


ADVERTISEMENT

Cast Or Convert Nvarchar With Comma As Decimal Separator To Decimal

Apr 29, 2008

Hello.

My database stores the decimals in Spanish format; "," (comma) as decimal separator.

I need to convert decimal nvarchar values (with comma as decimal separator) as a decimal or int.


Any Case using CAST or CONVERT, For Decimal or Int gives me the following error:

Error converting data type varchar to numeric



Any knows how to resolve.

Or any knows any parameter or similar, to indicate to the Cast or Convert, that the decimal separator is a comma instead a dot.

View 5 Replies View Related

Decimal Separator With Comma... Is Possible???

Aug 29, 2006

In Sql Server Express

I need use in field MONEY

"update product set price='1,23' where cod='001'"

i don´t use

"update product set price='1.23' where cod='001'"



View 1 Replies View Related

How Can I Use Comma Like A Decimal Separator?

Sep 11, 2006

"update product set price='1,99' where cod='001'"

I need COMMA... not DOT

In oracle i use "alter session set language='Brazil'"... but... in SQL SERVER???

View 1 Replies View Related

How Can I Use Comma Like A Decimal Separator?

Sep 11, 2006

"update product set price='1,99' where cod='001'"

I need COMMA... not DOT

In oracle i use "alter session set language='Brazil'"... but... in SQL SERVER???

i need help...

View 1 Replies View Related

How Can I Use Comma Like A Decimal Separator In Sql Server Express?

Sep 11, 2006

I need HELP

"update product set price='1,99' where cod='001'"

I need COMMA... not DOT

In oracle i use "alter session set language='Brazil'"... but... in SQL SERVER???

View 3 Replies View Related

Importing Text File Removes Decimal Separator

Feb 20, 2006

Hi,

I'm trying to import a semi-comma separated text file into a SQL db. I have a field in the text file that contains decimal number. As a decimal separator it's used a comma (15,35). When i use a DTS package to create a destination table and import all rows, the field is created as a float field. In this field the decimal comma is removed so the number in SQL becomes 1535. If I change the decimal separator to (.) i works OK. But I need to get it work with comma as decimal separator. In the DTS package the field form the text file is recognised as varchar (8000). Any ideas?



Ingar

View 3 Replies View Related

Locale Stuff

Jan 25, 2005

Hi,

You might just be able to save me downloading and installing SQL Server French...

I'm having localization problems with some .NET code - and I might be able to solve the problem if I know how SQL is parsed in different locales. Say my table MyTable contains a float column FloatColumn. In English, I would say
SELECT * FROM MyTable WHERE FloatColumn = 2.3

If my locale was, say for argument's sake, French, would I have to write
SELECT * FROM MyTable WHERE FloatColumn = 2,3
???

Thanks for your help,
T

View 1 Replies View Related

SQL Mobile - Locale Not Supported

Jan 19, 2006

I am working on the sample SQL Mobile application as located at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true


I am getting a SqlCeException as:

"The specified locale is not supported on this operating system."
The error is being thrown at line: int returnValue = this.Adapter.Fill(dataTable);

in the autogenerated code of SqlMobileDataSet.Designer.

My machine is Win XP SP2 (Hindi LIP installed). I am running VS 2005 and SQL 2005 (RTM). I am testing using DMA transport on Win Mobile 5.0 PPC Emulator.

Could someone suggest what steps do I need to take to solve this issue?

Cheers

Abhishek

View 4 Replies View Related

Locale Not Supported Error

Jan 22, 2007



I am using Vista and when I try to open one of the Business intelligence reports, I get error "Locale 16393 not supported". Any clue on this ?

Thanks

View 1 Replies View Related

Specifying Locale For Report Subscriptions

Nov 26, 2007


Is there a way to specify the locale for a report subscription?

I'm using the CreateSubsciption method through the web service and need to address the "User!Language" item within my reports. Currently, it's always en-US. If I manually access the report manager and set up a subscription in there, the locale is correctly taken from my browser settings. I would like to tap into this for subscriptions.

Thank You!!!

View 4 Replies View Related

Setting The Locale Of Reports

Feb 22, 2007

I am having a problem with date formats in reports.

I have a two servers, one setup as En-US and the other En-UK in Windows. I have various reports that are rendered using the report viewer control in local mode.

In my reports I have not set a language on any text boxes or on the report itself (using Default option in VS 2005). As I understand reporting services should therefore use the locale set in the browser, or else the locale of the report server.

However, when viewing the reports, both servers display date time values in American mm/dd/yyyy format!

I do not understand this as I am using the local machine to view the reports and the so the locale of the browser and the locale of the OS are En-US and En-UK respectively.

Please could somebody provide some information on how to localize reports correctly.

Thanks

View 4 Replies View Related

Legacy Database Uses Decimal Data Types.--&> AutomobileTypeId (PK, Decimal(10,0), Not Null) Why Not Integers Instead ?

Sep 26, 2007

I am working with a legacy SQL server database from SQL Server 2000. I noticed that in some places that they use decimal data types, that I would normally think they should be using integer data types. Why is this does anyone know?
 
Example: AutomobileTypeId (PK, decimal(10,0), not null)

View 5 Replies View Related

Storing Locale And Culture-information

Dec 9, 2006

Hi, I'm creating a web application with membership and such. And I have some problem figuring out how to store locale and culture data. My application needs to know the following three things for every user: country (or region), prefered language and their timezone. Now, the country and language can easily be stored as a CultureInfo string (such as "en-US" or "sv-SE"). However, i'm probably going to need two columns in my database if say a person lives in the US (and therefore applies to US registration fees, etc) but want the site displayed in swedish (my app implements global resources). So i guess (if no one objects to the above) my question is how do I store the timezone-data? There is ofcourse a System.Timezone class, but I'm not sure how to implement it. I obviously want my site to display the correct local time (all datetimes are stored as universaltime though). Is there a "universal" timezone-standard? Any ideas would be greatly appreciated. /David N. 

View 1 Replies View Related

How To Restart A Sql Server With Different Locale Id From Box It's Running

Jan 5, 2001

I acciently change the locale id of my sql server using sp_configure. After i stop the server it now can not be re-started. Any help is appreciated.

View 1 Replies View Related

Locale Issues With Multiple Datasets

Nov 26, 2007



My company is implementing a multilingual solution for our application, so naturally the reports must follow. Every report I create has 2 datasets. It seems to me that the first dataset translates appropriately based on the browser's language setting, but the second dataset disregards the locale and just displays things in en-US. I've even created a sample report that accesses the exact same columns from the exact same view and dataset1 returns the correct language, but dataset2 returns en-US.



The report's language is set to =iif( User!Language = "fr-CA", "fr-CA", "en-US"), but I've also tried just setting it to = User!Language or leaving it at Default just to see if that would work.

Has anyone come across this before and been able to find a work-around?

Thanks!

mmat

View 2 Replies View Related

Data Type With Decimal Point For Decimal Values But Not For Whole Integers

Dec 8, 2013

I am creating a table on SQL Server. One of the columns in this new table contains whole integer as wells as decimal values (i.e. 4500 0.9876). I currently have this column defined as Decimal(12,4). This adds 4 digits after the decimal point to the whole integers. Is there a data type that will have the decimal point only for decimal values and no decimal point for the whole integers?

View 2 Replies View Related

Converting (casting) From Decimal(24,4) To Decimal(21,4) Data Type Problem

Jul 24, 2006

Hello!



I would like to cast (convert) data type decimal(24,4) to
decimal(21,4). I could not do this using standard casting function
CAST(@variable as decimal(21,4)) or CONVERT(decimal(21,4),@variable)
because of the following error: "Arithmetic overflow error converting
numeric to data type numeric." Is that because of possible loss of the
value?

Thanks for giving me any advice,

Ziga

View 6 Replies View Related

Use Ctrl-A As A Column Separator

Oct 2, 2013

I need to be able to export the data from a table to a text file using sqlcmd. I need to be able to use Ctrl-A as a column separator. Is this doable, and if so, how? I am assuming the this is a value used by the -s option.I need to use a batch file to run the sqlcmd utility.

View 6 Replies View Related

How To Add A Line/separator Between Groups?

Jul 20, 2006

Hi,

I have a simple report with multiple grouping. I like to add a separator between groups.

Some data (Group #1)

================= <----- separator line or color row or something

Some data (Group #2)

=================

Thanks.

View 4 Replies View Related

How Can I Use The Decimal Comma Instead Of Decimal Point For Numbers In Jet Engine?

Sep 19, 2007



I wanted to convert a dataset from vb.net (2.0) to an .XLS file, by MS Jet. My national standard is using decimal commas, not decimal points for numbers signing the beginning of decimal places.
But the MS Jet Engine uses decimal point,in default. Therefore, in the Excel file only string formatted cells can welcome this data, not number formatted.
How can I solve or get around this problem? (with jet if it possible)
iviczl

View 4 Replies View Related

Query Results To Only Show ONE Result Per Locale

Feb 5, 2015

My query produces accurate results just produces one instance for each sales region. I am needing it to only give me one instance of each sales region and give me total counts. What should I re-write?

Code:
Select
salesmanname,
case when [state] IN ('GA', 'FL', 'AL', 'SC', 'NC', 'TN') Then 'South'
when [state] IN ('CA', 'NV', 'WA', 'OR', 'TX') Then 'West'
when [state IN ('NY', 'NJ', 'PA', 'DL', 'CT') Then 'NE'
end As [Sales Region]

[Code] ....

View 1 Replies View Related

How To Select Amt With Thousand Separator Format?

Mar 10, 2008

Hi,
Can you tell me the query for selecting the amount with thousand separator format?

for example : select 1234.678 is need to show the output line 1,234.68

View 7 Replies View Related

Difference Between Windows Locale In Remote Settings And SQL Server

Jul 20, 2005

Hello,I just installed a SQL server and playing with it. I was reading up onCollation and tried rebuilding the master database after changing toLatin 1. After the master database was built, I looked at the regionalsettings and realized that it was still English. When I tried tochange the settings again using rebuild database, I saw that myselection was gone and replaced by the default setting. Iam a newbieand any help is appreciatedThanks!Sunder

View 1 Replies View Related

Who Could Figour Out This Error&&<Locale ID 2052 Is Not Installed In This System&&>

Aug 7, 2007



Hello all:



When running the SSIS, i met the error report:Locale ID 2052 is not installed in this system.

I searched the error descrpition in the google, Seem the LCID 2052 is page code.it 's chinese page code.

BUt i still cannot figour out why the error reported. cuz in all DB objects , no chinese was used.And my labtop is also english version.





Could anyone give me a hand?



Thanks.

View 3 Replies View Related

Format Number Thousands Separator With Point

Aug 14, 2012

Format number thousands separator with point

I have this number in my database output result of query: 1013473

I need this output: 1.013.473

View 7 Replies View Related

Format Number With Thousands Separator? 10000 --&&> 10,000

Oct 24, 2007



I would like to select a BIGINT type and get a formatted result with commas. Anyone have ideas?

declare @i bigint
set @i = 123456789

select @i

--Would like to get
123,456,789

View 39 Replies View Related

Converting Decimal To String W/O Decimal Point

Jul 23, 2005

I'd like to convert a Decimal value into a string so that the entireoriginal value and length remains intact but there is no decimal point.For example, the decimal value 6.250 is selected as 06250.Can this be done?

View 6 Replies View Related

Converting Decimal Point To Decimal Comma

Nov 30, 2007

Hi all,

I am designing some reports for a German branch of my company and need to replace decimal point with a comma and the thousand comma seperator with a decimal point.

e.g.
‚¬1,500,123.00 to ‚¬1.500.123,00

Is there a property that I can change in the report designer to allow this to happen or is this something I need to convert in a Stored Proc.

Any help would be much appreciated

Thanks!

View 5 Replies View Related

Insert Adjusted Datetime Into Sql Field Based On User Locale

Jul 29, 2004

Is there a way to adjust a date and time depending on the users locale before inserting into the database?

Users login in and their country of residence is stored in the database on signup. My server is in the US and I want to reset part of the users db record when it's the end of the day in their country so I need to enter the date and time into the db plus or minus the time difference, is there a function written to do this already or would i need to write my own?

View 1 Replies View Related

Changing Database Server Locale Date Time Settings ?

Jun 15, 2007

Hi There



We currently have the following scenario:

4 app servers with regional date and time settings of locale A.

1 database server with locale settings B.



What is happening is that timestamps are being generated on the app servers, these are then in a sql command which fails on the database server since the timestamp format is invalid.



It was suggested that we change the regional locale settings of the database server, but will this not have serious implications , for example every current timestamp format in the datbase will become invalid?



In a nutshell is it safe to change a database servers regional date time locale settings ? Or are there serious implications?



Thanx

View 1 Replies View Related

Help Required For Splitting Up String Variable Using Comma Separator

Jul 9, 2007

I need a help in SQL Server 2000.
I am having a string variable in the format like -- (1,23,445,5,12)
I need to take single value at a time (like 1 for 1st, 23 for 2nd and so on) from the variable and update the database accordingly. This is like a FOR loop.
Can anyone help me out in splitting the variable using the comma separator...

View 4 Replies View Related

Update Final Table With Values Into Comma Separator?

Mar 24, 2014

I would like to update the final table with values into a comma separator as follows with examples:

I think I have the IDs set correctly for this example:

You can see from the final table that the code column can be a combination of more than one rows from the map tables...

create table #tblTax(TaxStatusID int, FullName varchar(20)
insert into #tblTax values(1, 'Taxable')
insert into #tblTax values(2, 'exempt')

create table #tblTypes(TypeID int, description varchar(100)
insert into #tblTypes values(1, 'cor')
insert into #tblTypes values(2, 'tyr')

[code]....

Looking at the above example, I would like to have the #tblMain as follows

#tblMain
ShoetNameLongNameClientNameTaxIDTypeID
======================================================================
A, B'dand, Barlow''johnson'133
G'mond''anderson'26
I'somelongcode''jacksons'21
A, B'dand, Barlow''smith'112

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved