Posts by Jeferson Jácomo • 11 points
3 posts
-
1
votes2
answers127
viewsA: Prevent Insert or Update If date is in a Registered range
Try something like create Trigger lock on TABLE for Insert as declare @int code, @data date, @int type select @codigo = codigo, @data = date, @type = type from inserted IF (@data between…
-
0
votes1
answer53
viewsA: Doubt how to mount a query in Mysql
These filter that you used in the case, put it in the clause Where at the bottom, and in the case you filter only the years. Following example: SELECT SUM(CASE WHEN(YEAR(DATA)) = 2017 THEN…
-
0
votes1
answer381
viewsA: Bring last date of SQL Product
The error is in the subquery you made, it is only bringing up a table date Venda_Item_Produto, note that if you run only this Select: SELECT DISTINCT TOP 1 DATA FROM Venda LEFT JOIN…