Posts by vitorjf07 • 11 points
3 posts
-
-1
votes1
answer29
viewsQ: SQL Server - Function to format date field with Convert command
I have the following function: select convert(DATE,GETDATE(),101) Where she returns to me as follows: 2021-08-17 I want him to return me a data with this format "17/8/2021" keeping the data as date.…
-
0
votes1
answer23
viewsQ: Doubt to return a query
I have the following problem, in sql server I have a table of contracts and one of clients where returns as follows: In Where condition I need to pick up only the last created id of each customer’s…
-
0
votes2
answers90
viewsA: I need to create a report that sums up values by category and groups this information according to origin
Try using the WITH command Thus: WITH RELATORIO AS (SELECT UNIDADE, TURMA, SUM( CASE WHEN CODTX IN ('000','001','002') THEN VALORPAGO ELSE 0 END) as 'MENSALIDADE', SUM( CASE WHEN CODTX IN…