Questions tagged as 'sql-server'

3
answers

SQL - Return records to zero

Good morning, I have a query that is returning only the months with sales consumption, which should be the correct one. But now a blessed user wants me to come back every month, even those who have not had sales. How do I return as zero inclu...
asked by 27.06.2016 / 15:41
2
answers

Connection problem with the database

I'm building an application from NetBeans IDE 8.1 and accessing the database developed in Sql server more when executing the application is generating the error:    Connection error The port number 1433 / system_vend is not valid I alread...
asked by 30.01.2017 / 13:23
1
answer

Error When Adding Controller in ASP.NET MVC

A question when creating a controller . Because trying to create it has presented the error of the attached image. I created 3 small classes: Dependentes , Tipobenef , TitularPlano and ProvaContext [Table("depende...
asked by 02.01.2019 / 03:56
2
answers

How to select records in a table Auto referenced using Recursion?

In a scenario of areas where one area can be overseen by another one is represented in a tree structure as follows: Problem:TheneedtoselectÁrea(CBT-CubatãoIndustrialComplex)followtheHierarchy.(InthissituationalltheAreaslistedintheimage)Ther...
asked by 27.06.2017 / 16:14
1
answer

What extension of PHP should I use with SQL Server 2000?

I am trying to connect to the SQL Server 2000 database using PHP PDO SQLSRV, but when access to index returns me the catch() with the following error    SQLSTATE [08001]: [Microsoft] [SQL Server Native Client 11.0] SQL Server Native...
asked by 16.02.2016 / 00:32
1
answer

SQL - scope_identity () for INSERT SELECT

Is there something similar to scope_identity() to return me the ids created by giving insert based on select ? (% with more than one line at a time). NOTE: insert returns only one of scope_identity() ....
asked by 18.04.2017 / 03:27
1
answer

How to return day of week and time formatted sql server 2008?

I need to make a query as follows, I have a table (script): 1 - Pick up the day of the week 2 - Get the server time in hh:mm format example: SELECT CASE DATEPART(DW, GETDATE()) WHEN 1 THEN 'DOMINGO' WHEN 2 THEN 'SE...
asked by 29.12.2015 / 03:47
3
answers

How to point the entity framework to another bank?

Hello, My Entity Framework always points to my local bank ... I have already tried to change the connection string passing the data from a database that is on another server and nothing happens it keeps pointing location even if I comment the...
asked by 10.12.2015 / 19:39
1
answer

How to do a time comparison in sql sever

I have a sql query: select HORA_FECHAMENTO, --campo char no recebendo a hora no formato 18:00 CONVERT(VARCHAR(11),GETDATE(),114) as HORA_ATUAL from TB_ESTRACAO where IDEXTRACAO = 4 I want to compare the server time, it must always...
asked by 10.01.2016 / 03:03
1
answer

Working with a high processing load on a table

What are possible database modeling strategies in a scenario where you have a specific table that receives a gigantic load of statements of insert , update and delete , in addition to queries with high data processing,...
asked by 15.01.2016 / 20:17