Questions tagged as 'sql-server'

1
answer

Relationship in tables in the database

I have a table in the database called Veiculo and it has the following fields: placa , renavam , marca , cor and categoria . For placa and renavam everything is fine, since the data is unique...
asked by 24.10.2017 / 18:26
0
answers

Sending values to DB leaves application too slow

I have created a java program to capture the movement of a sensor and then send the data to a database, so that the movement is accessed by another machine in real time (or almost) from another location. the movement is captured perfectly, the d...
asked by 23.10.2017 / 00:57
1
answer

Delete constraint after taking its name

I'm running the following query to get the name of 2 constraints : select TC.Constraint_Name from information_schema.table_constraints TC inner join information_schema.constraint_column_usage CC on TC.Constraint_Name = CC.Constrai...
asked by 16.10.2017 / 19:45
1
answer

Problem handling dates in an ACCESS / VBA application with SQL Server database

I needed to migrate the bank of an application made in vba using the access. The database was native to access and I switched to SQL Server. In access, as everything is native everything worked perfectly, but in migration a problem that is gi...
asked by 20.10.2017 / 06:19
0
answers

Validate strings with many zeros

I have to perform a validation on a trigger in sql server the rule is: if cnpj is! = 0 and does not exist in another continue record; But cnpj can come with 0 or 000 or 0000000 or 00, which would be the same ... I am currently doing the va...
asked by 02.10.2017 / 17:31
0
answers

ASP.NET MVC system does not bring newly registered data, only the oldest data on the production server

I have a system developed in ASP.NET MVC that has a registry of authors. The system works normally on my machine but when I upload it to the production environment it only brings back only the oldest records in the data list. The data...
asked by 02.10.2017 / 15:05
1
answer

Change PrimaryKey EntityFramework

How to change a primary key using EntityFramework? I have a table with simple PK and need to change this PK through EntityFramework.     
asked by 27.09.2017 / 13:33
1
answer

Call stored procedure on laravel using SQL Server with OUTPUT

I'm trying to call a stored procedure by Laravel 5.5 but I can not. I'm using SQL Server. Follow the stored procedure: declare @CodigoRet int exec Generator 'LancaContaContabil', @Codigo = @CodigoRet output Select @CodigoRet I research...
asked by 27.09.2017 / 15:26
1
answer

Concatenate query [MSSQL]

I have a question on how I could concatenate the email column, as per the query below: select * from orcam INNER JOIN ccusto as a ON orcam.Ccusto = a.Ccusto INNER JOIN grupo_email b on a.Ccusto COLLATE SQL_Latin1_General_CP1_CI_AS = b.cc INNE...
asked by 22.09.2017 / 23:48
0
answers

Change MySQL query to work in SQL Server and Oracle

Would anyone know how to tell me how this MySQL query would look like in SQL Server and Oracle? SELECT COUNT(*) AS TOTAL, SUM(EVENTO = 7 AND RESULTADO = 0) AS QTD_RX_OK, SUM(EVENTO = 7 AND RESULTADO <> 0) AS QTD_RX_ERR, SUM(...
asked by 25.09.2017 / 16:48