Posts by Rennan Moura • 303 points
5 posts
-
3
votes1
answer1310
viewsQ: In Sql server does "GO" have the same point and comma function?
What is the reserved word "GO" for Sql Server, when generating a script using Sql Server Management is always generated with the reserved word "GO" at the end of the instructions, however if I take…
-
0
votes3
answers72
viewsA: Code reduction in sql query
You don’t need to use the or, just use only the instruction not in in the field empresa_codigo, in this way helps in the performance of its query and still meets what you asked, decreasing in its…
-
3
votes2
answers4510
viewsA: Round Up SQL SERVER
Knife like this : SELECT CONVERT(DECIMAL,ROUND(SUM(44)/8.0,0)) You are putting the comma in place of the point. So he understands that it is another parameter not the number.…
sql-serveranswered Rennan Moura 303 -
6
votes3
answers89
viewsA: Add values to total - SQL
Do so : SELECT SUM(( sub_total ) + ( others_price )) FROM (SELECT Count(tbl_purchase_product.sub_total) SUB_TOTAL, Count(others_price) OTHERS_PRICE FROM tbl_purchase_product WHERE…
sqlanswered Rennan Moura 303 -
4
votes3
answers147
viewsA: Join between banks
You can run this way without Where : SELECT a.pm_id AS banco1, b.pm_id AS banco2 FROM sistema.tb_menus_perfil_params a(NOLOCK) LEFT JOIN banco2.sistema.bdo.tb_menus_perfil_params b (NOLOCK) ON…