SQL




How to resolve Microsoft SQL Server Error 15023 "User already exists"

Microsoft SQL Server Error 15023

When you restore a database from backup to your SQL server in test environment, you will try to add Role to a restored database for user. At this time you may get the error message:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo). User, group or role 'UserName' already exists in the current database. (Microsoft SQL Server Error" 15023). (read more...)

Concatenating NULL value columns in T-SQL

Figure 2. Concatenating after changing CONCAT_NULL_YIELDS_NULL to OFF

Concatenating of string columns is not very simple task in T-SQL if you don’t know ANSI standart of it. According to ANSI standart of SQL, concatenating of NULL-value is NULL in the result. It’s not clearly for developer, but it is so.

Let’s see some features for work with concatenating NULL-value columns. For example, I will use tutorial database Northwind and its table Customers. (read more...)

Transact-SQL string functions

This post is about which string functions there are in Transact-SQL. They allow to modify data you have, make custom queries to select records from database tables. To know them is very important for any developer - using string functions is very good way to decrease load from application server without adding it to SQL because string functions on SQL server work very fast. (read more...)


MarkiMarta.com. Notes of web-specialist
Since 2009
18+