Questions tagged as 'sql-server'

1
answer

How to create a CONSTRAINT CHECK in SQLServer to validate versions with RegEx

Hello, I am creating a table in SQLServer where I want to validate a field to only accept the correct version mask, like this: CREATE TABLE Versao ( id INT NOT NULL IDENTITY(1,1), codigo NVARCHAR(100) NOT NULL, CONSTRAINT [PK_Vers...
asked by 18.04.2018 / 14:28
0
answers

Replacing characters in SQl Server tables

I need to replace some strings in a database. I AM TRYING WITH: UPDATE dbo.ModeloMensagem SET corpoMensagem = REPLACE(dbo.ModeloMensagem.corpoMensagem, '<', '[') WHERE dbo.ModeloMensagem.corpoMensagem IN (SELECT DISTINCT(dbo.CampoTipoMen...
asked by 11.04.2018 / 15:19
0
answers

Decrypt Procedures and Functions in SQL Server

I need to decrypt some routines that are using " WITH ENCRYPTION " and would like to know if there is any way for SQL Server itself, without having to use third-party tools, to do that.     
asked by 05.04.2018 / 15:16
0
answers

decrypt password field of an ASP application that writes to a MSSQL DB

I need help figuring out how to decrypt or just read this password from my database, I happen to need to use that user table for another application, however, I have no idea what type of encryption the application is using in the password fields...
asked by 09.04.2018 / 16:55
1
answer

Return 01 column data in 03

I'm working with a data in a table, in which I made a SELECT that one of the columns returns the status of the processes that are in progress in our queue. The data in this column is for example: "In progress", "Completed", "Canceled". I need...
asked by 29.03.2018 / 02:53
0
answers

Trigger - Get the Active Directory user

Hello. In the database I have a trigger that saves the user who made the last change in the database. In the old system (still in use) the login with the database was made by AD (active directory) which allowed me to use the function SUSER_SNAME...
asked by 28.03.2018 / 16:02
0
answers

Api node can not communicate with bank in docker

I have to do deploy of a software, I have WEB where FRONT , APISEG authentication and security of the software, API that makes all operations and the BANK with a sql server 2017 bank. Every project was developed with angular and...
asked by 04.04.2018 / 14:20
1
answer

Problem with accentuation when exporting data from Sql Server to Excel

I have the following code inside a button responsible for performing the export of the data from my table to excel. string caminho = "c:\caminho"; // criar um arquivo para escrever using (StreamWriter sw = File.CreateText...
asked by 03.04.2018 / 16:36
2
answers

Format date from the SQL SERVER Database

The date that comes from SQL SERVER comes in the following format: 20181212. I tried formatting, but it only works if it comes in the 2018-12-12 format. I put this date inside a table by the API I pull where the data is (date comes from the A...
asked by 16.03.2018 / 13:37
1
answer

Error: Error converting data type nvarchar to numeric

I'm trying to convert data from a column in NVARCHAR (255) to DECIMAL (10,2), however, all the ways I tried it always gives the same error Error converting data type nvarchar to numeric . I created another column of type DECIMAL (10,2) to trans...
asked by 12.03.2018 / 21:54