SQL Server set decimal separator different than OS - sql

I have a database in Microsoft SQL Server Standard 14.0.1000.169 in a machine whose culture (from Powershell Get-Culture) is it-IT hence the decimal separator is the comma.
I am unable to load data containing numbers with the decimal dot separator in columns set as "decimal" or "float" as the server only accepts commas.
How can I configure the database to use a different culture than the system's?
I am using Microsoft SQL Server Management Studio v18.3.1

Related

How to store the number without the comma in SQL server

We have a web application which from the UI is passing a value say 50.00 but when it is stored in the database it is stored as 50000. Most of our installations are for English OS (windows 7) but this problem is on a dutch installation.
Is there a way I can tweak SQL server so that it saves the value at 50 and not 50000 without changing any code? The field in the database is an integer.
The customer has SQL server 2008 express.

UTF-8 conversion into SQL Windows Server 2008 R2 from 2003

We have been using SQL Server on Microsoft Windows Server 2003 SP2, and are now attempting to transfer across to a new server, running 2008 R2. One of our clients has a seperate jobs database which creates text files that are updated via FTP to a folder on our server 3 times daily, to then be imported into a corresponding series of tables in our database. Here is the old code for the import:
Delete
From Client.dbo.jobs
Go
BULK INSERT CarltonRR.dbo.jobs
FROM 'D:\folder\clientDatabaseUpload\jobs.txt'
WITH
(
DATAFILETYPE='char',
CODEPAGE = '65001',
FIELDTERMINATOR = '|',
ROWTERMINATOR = '\|\n'
)
Go
After the initial errors, and subsequent searching, I removed the 'CODEPAGE = '65001', line because of the issues mentioned in this documentation, that 2008 R2 does not support UTF-8, however the database would automatically convert to UTF-16. This resulted in problems displaying some characters (£ for example) which the old system handles fine. The Data Type for the field(s) that are not displaying properly is varchar(50)
Is there a change that needs to be made to the SQL queries from 2003 to 2008 R2 that would allow the special characters in the .txt files to be displayed in the database?
Edit: The Data Type for the field(s) in question is nvarchar(50), not varchar(50)
Edit 2: If it helps, the listed sign in replacement of the ' £ ' sign is ' ┬ú '

SQL Server datetime field issue

My personal computer is running Windows 7 (language turkish) and I installed SQL Server 2008. When I create a new database, the database language is Turkish_CI_AS
And I have a server with Windows Server 2003 (language english) and installed SQL Server 2008 on that server. I set the Regional and Language Options as Turkish. I am creating a database and selecting collation Turkish_CI_AS
But when I insert a row into a table on the server, an error occurrs:
The date format is invalid
You should always use unambigious formats like YYYYMMDD or YYYYMMDD HH:MM:SS so that no matter what setting the server/database is it will be added correctly. Read this for a better understanding http://beyondrelational.com/modules/2/blogs/70/posts/10898/understanding-datetime-column-part-ii.aspx

Unicode collation for SQL Server 2005?

I need a collation for a database that correctly stores any Unicode character in a SQL Server 2005 instance. The column currently is of type nvarchar (can be changed). How can I do that?
Collation has no connection to storage of N[VAR]CHAR data - it states the rules of comparison between strings.
So - you made the right choice - NVARCHAR

Can unicode chars in sql queries cause slow db performance?

Can use of unicode chars in queries cause database to slow down?
I am using a query like
Select * from table where name='xyz¿½'
After this query my application slows down permanently until I restart it.
I am using c3p0 hibernate's connection pool
A modern database should support Unicode, but that may be restricted to certain data types.
For example SQL Server only supports Unicode for the following data types:
nchar
nvarchar
nvarchar(max) – new in SQL Server 2005
ntext
Unicode string constants (say within stored procedures/functions) should be preceded with the letter N e.g. N'abcd'
I found that sybase does not use an index when query contains unicode characters. It may be due to some charset settings in my version.