Does SQL Azure support REPLACE T-SQL function with cyrillic characters?

346 views Asked by At

I am trying command like

USE [aaa]
GO
SELECT [Id]
      ,REPLACE([BlaBlaField], 'xyz','') 
  FROM [dbo].[aaa]
GO

through SQL Management Studio on SQL EXPRESS and SQL Azure Web Edition DB. In SQL Express it works, but on Azure it does not. I searched on the web at 'Azure SQL Database General Guidelines and Limitations' page and on this page but the command was not listed as not supported. Is it supported or not?

UPDATE The problem appears only when I use cyrillic symbols. For example :

 USE [aaa]
    GO
    SELECT [Id]
          ,REPLACE([BlaBlaField], '2004','-') 
      FROM [dbo].[aaa]
    GO

works but :

 USE [aaa]
    GO
    SELECT [Id]
          ,REPLACE([BlaBlaField], '2004г','') 
      FROM [dbo].[aaa]
    GO

UPDATE - PROBLEM SOLVED

The problem was solved by not using REPLACE but a combination of LEFT, RIGHT, SUBSTRING and CHARINDEX avoiding the use or cyrillic characters.

does not.

1

There are 1 answers

2
Jan Engelsberg On BEST ANSWER

The replace function itself works in Azure SQL Database.

What does not work in SQL Database is USE [aaa]. You have to connect to the correct database first and then issues the statement in.