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...
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...
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...
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...
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...
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...
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...
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...
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(...