Questions tagged as 'sql-server'

1
answer

Recover customer orders 1. Duplication ERROR

My code: SELECT Pedido.NumPedido , Pedido.CdCliente , Cliente.Nome , Produto.CdProduto , Produto.Descricao , PedidoItem.Quantidade , PedidoItem.ValorUnitario , PedidoItem.ValorTotalItem FROM Cliente...
asked by 12.06.2018 / 15:18
1
answer

DDD + Entityframework + Migrations + SQL Server

Hello, I have a Solution that I am implementing the DDD architecture with Entityframework, migrations and SQL Server! However, I am not able to connect to my local database when performing the migrations command: 'Updata-database'! I believe tha...
asked by 09.05.2018 / 23:51
1
answer

EntityFramework + Sql Server + ASP.NET MVC

Hello, I have an ASP.NET MVC application that is using the ORM EntityFramework to communicate with a SQL Server database! Currently I switched to a computer and had to install everything again, Visual Studio, and SQL Server Management. But whe...
asked by 05.05.2018 / 00:25
1
answer

How to return the total quantity when using OFFSET and FETCH NEXT?

I needed to use OFFSET and FETCH NEXT to return a range of data between my query. Table CREATE TABLE [dbo].[Usuario] ( [Id] [int] IDENTITY(1,1) NOT NULL, [Email] [nvarchar](max) NULL, [Nome] [nvarchar](max) NULL, [Sobr...
asked by 27.04.2018 / 01:24
1
answer

SQL Procedure improvement

I would like to know if there would be a way to improve a code I made on hand in SQL ... I have a table of the following Table Chave identificadora - DataProduto - Preço - Marca Lanche - Pao/presunto - 01/01/2017 - 5.90 - McDonalds...
asked by 16.04.2018 / 00:07
1
answer

How to sort varchar field with letters and numbers in sql server

I have the following query below and would like to sort by image, but the number. WITH cteNiveis(IdConta, NivelRec, NomeTab, Caminho, Nivel, Tipo, Status, Nome) AS ( SELECT CO.Id, 1 , CAST(CO.Nome AS VARCHAR(MAX)) AS NomeTab, CAST(...
asked by 06.04.2018 / 15:25
1
answer

Is SQL Express free?

I need a database to use in a Xamarin Forms application for college. I got to create in Azure, but the limitation of 32 MB is very great because I need to store photos too. I gave one a lookup and saw that it has the Express version of SQL, whic...
asked by 07.05.2018 / 02:04
2
answers

Select only 1 record per month with an aggravating factor that prevents the use of Group By

I have the following table: Ineedtobringonlytheoldestsaleoftheclient,regardlessofthetypeofsale,howeverIneedthetypeofsaletocomeinselect,beforeIhadasimilarquestionandtheyhelpedmehereinStackOverflow,butraisingthelevelofstudies,Icameupwiththispr...
asked by 08.05.2018 / 15:40
2
answers

Error trying to connect to SQL Server with CodeIgniter and PHP 7

Good afternoon, I started having problems with my CI when upgrading my development environment (windows + xammp) and production (ubuntu + apache) to the latest version of PHP 7.1.10. When trying to connect to Microsoft SQL Server I get the fo...
asked by 07.05.2018 / 22:00
1
answer

When the Trigger SQL server is fired After Insert?

When a trigger is triggered after an insert and the insert is within a transaction, does the trigger execute at the time of the insert or at the end of the transaction?     
asked by 07.03.2018 / 21:18