Questions tagged as 'sql-server'

2
answers

Join tables for Tableau

I needed to create an extraction for a Tableau report, where my team developed the database and the web system, and another company developed the Tableau report. This is the schema of the problem To feed the tableau report I developed t...
asked by 30.09.2017 / 04:47
1
answer

MSSQL 2012 login transaction log

I need a help, I have to make a login in the MSSQL the company of the ERP and my superior needs to monitor the transactions of type INSERT , DELETE and UPDATE that are made by them, in case the scripts that were run on...
asked by 17.08.2017 / 18:32
1
answer

split 1 column into 2 on sql server giving update

I use SQL Server 2012 I have the following problem, in a table there are records of municipalities and two respective UFs, however the need arises to divide this column into two municipalities and one UF, but the data is like this: CANDÓI-P...
asked by 12.07.2017 / 22:07
1
answer

How to ungroup transactions or group by day? [closed]

SELECT COUNT(*) QTD_TRANSACOES, CD_RSP_RECUSA, SUM(VL_AUTORIZADO) VALOR_SOMATORIO, CASE WHEN MR.DS_MOTIVO_RECUSA IS NULL THEN 'CÓDIGO DE RECUSA NÃO CADASTRADO' WHEN MR.DS_MOTI...
asked by 03.07.2017 / 15:22
1
answer

Assign a variable to a Dynamic Data?

My goal is to create a procedure in SQL Server , which has by default two variables, one with the start date of (hoje - 3 anos) and another as the end date equal to hoje . I already use for other operations (for example a between)...
asked by 23.05.2017 / 20:22
1
answer

Error connecting to SQLServer database C # Web.config

I'm trying to make a .NET MVC application, but when I'm going to connect to the bank it's giving the following error:    An exception of type 'System.NullReferenceException' occurred in GerarXML.dll but was not handled in user code Add...
asked by 27.07.2017 / 01:08
1
answer

Error creating a distribution of an executable with sql database using the Entity Framework

I'm developing a desktop winforms application with C # in Visual Studio with Sql database through the Entity Framework. The intention is that it be a local database, the program will be installed on isolated machines, which have no access to any...
asked by 02.05.2018 / 19:48
1
answer

How to compare the values of a column with the mean of these values in SQL?

I have a column of books, and I want to just show the books that the price is higher than the average of these prices, how to do that? The name of my column is price , and I can not put a where price > avg(price) , nor a having...
asked by 25.08.2017 / 15:38
1
answer

Insert value into a C #

I have to read a column (which is the primary key of a table) and see if in that column there is a value of a variable, if it does not exist, I want to add it, if it exists, I want to move on. I have this code, but it tries to insert even if it...
asked by 27.04.2017 / 16:22
1
answer

Add a Character to the value of a column

I would like to know if you can include a character set at the end of a column's data. For example: 'Coluna 1- Quantidade |10000 |20000 |15000 |20000 I want to extract a query where I can display this data with a character after the...
asked by 29.08.2017 / 21:19