I’ve got a script that I’ve created for our production line where the user enters some variables into the script before executing. The Problem is that the variables are NVARCHAR(9) and if the user inputs a 10 character sting the last character is…
Possible Duplicate:
varchar vs nvarchar performance
I have changed all nvarchar column to varchar for a hope to speed up query. but my Query now become slow. before it was running 15 sec, now run time is 26 sec.
what could make this slower? am I…
I'm using Laravel 5.7 along with SQL Server 2017 and I want to generate a varchar(50) column called name.
Executing this code gives me a nvarchar(50) instead:
Schema::create('test', function(Blueprint $table) {
$table->string('name',…
I have an existing EF code first project which has created the database with all nvarchar columns in the database. Now I am starting another project on the same database for statistical purpose. This new project however is using EF core as pointing…
I am creating an application in Laravel, which accesses information stored in a remote database Microsoft SQL Server.
And I have encountered an error, which I solved; but I do not quite know why...
The Problem
I created a "users" table within the…
Im building a website that might have unicode characters in it the client hasn't specified, I want to use nvarchar as the datatype on sql server. Is there any downside to using nvarchar over varchar.
Why would anyone want to use varchar over…
I am using Access 2003 as a front end UI for a SQL Server 2008 database. In looking at my SQL Server database design I am wondering if nvarchar was the right choice to use over varchar. I chose nvarchar because I thought it would be useful in case…
Can someone please explain why this is happening on SQL Server 2008:
declare @sql Nvarchar(max);
set @sql =N'';
select @sql = @sql +replicate('a',4000) + replicate('b', 6000);
select len(@sql)
Returns: 8000
Multiple sites suggest that as long as…
I am using a JDBC Prepared Statement with a bunch of parameters using setString(pos, value). The underlying columns on the tables are all NCHAR and NVARCHAR2. I have set the Oracle JDBC driver's "defaultNChar=true" so that Oracle DB would always…
We recently started seeing this error for an application which was previously working. No code changes have been made to cause the error, nor database changes (to my knowledge). There was supposedly some fairly recent change made to the server's…
I've got an Oracle DB with ALL the character columns defined as NVARCHAR or NCHAR or NCLOB, using charset UTF-16.
Now I want to migrate to a new DB that has charset UTF-8. Since it can store unicode characters, I'm wandering if I will be able to…
In SQL Server 2005 (not 7.0), is there any reason to use NVARCHAR(255) instead of 256 or some other number?
Is there any optimal size, and is there any reason to use powers of two?
(I will be storing Unicode data, so I have to use NVARCHAR)
The project that I'm working on has the following setup: JPA 2.0 (Hibernate 4 implementation) and SQL Server 2008 R2.
I need to select some data from an SQL view. In order to do this I use a native query, but I ran into some problems with the…
Presently troubleshooting a problem where running this SQL query:
UPDATE tblBenchmarkData
SET OriginalValue = DataValue, OriginalUnitID = DataUnitID,
DataValue = CAST(DataValue AS float) * 1.335
WHERE
FieldDataSetID =…
I've got 2 servers with two different login date formats (English & British English).
I need to be able to CAST an nvarchar value to datetime regardless of the date format.
I have the following query:
select cast('2011-13-07' as datetime)
This…