Posts by Souza • 19 points
3 posts
-
0
votes1
answer47
viewsQ: Best Script Performance
I made a condition that way: If @dt_contabilizacao = @dt_operacional And Not Exists (Select 1 From tabela Where dt_mes_referencia = @mes_referencia) But the check of dt is not necessary since if…
-
-1
votes1
answer85
viewsQ: Using the DATEDIFF
Guys, how do I make a condition with DATEDIFF deletes data from a table in 12 in 12 months? Example: You are in June 2020 - Then it erases everything before 01/06/2019. Another example: You are in…
-
-1
votes1
answer188
viewsQ: How to not add zeroed values - SQL
I have several columns and some of them are practically zeroed, like every 100 rows have a value. I’m adding these columns with SUM(column1), SUM(column2)... but when adding up these columns I don’t…