SQL Report Builder 3.0 Merge Rows into a Totalizer column

0

Considering a simple query where you bring a list of people containing your name, code and your age, I would like the last number of the right column to appear in the sum of the ages according to the image (in this example I consider that each one was 15 years old)

Using groups up to you but the group always stays at the beginning of the table (left side) I would like it to be on the right side, there is an option to invert the table orientation, but it looks like it was mirrored I would have to reverse the position of the fields so that it is close to the ideal however this for a future maintenance would be difficult to understand, I would like to know if there is a simpler solution, perhaps with an expression

    
asked by anonymous 02.05.2017 / 15:56

1 answer

0

One solution:

SELECT NOME,
       CODIGO,
       (SELECT SUM(IDADE) FROM TABELA) SOMA_IDADE
FROM TABELA

Some ANALYTIC FUNCTIONS BDs that facilitate such tasks.

    
02.05.2017 / 18:31