OleMartinGulbrandsen-4027 avatar image
0 Votes"
OleMartinGulbrandsen-4027 asked AnuragSharma-MSFT commented

Azure Sql Database: how to perform calculations on the data I'm querying

I am exporting data from my DataGrid, to a Azure Sql database table. But I need to manipulate and do some math with it.

What I'm hoping is possible to do by query, is:

  • Sort data by Column1 (20 entries, with several hundred lines each)

  • Add the contents of all the cells in Column 2, of Column 3 and of Column 4

  • Create two new columns, X and Y

  • Set the content of Column X to be (Column1 * ColumnY / 100)

  • Set the content of Column Y to be a 8

  • I want my table to filled with just 20 lines, the summarization of all the hundreds of line of each entry in Column1.

What I have tried:

Trying to get an idea if this is possible or not to do with a query. I would prefer not to do this "manually" in the DataGrid. Would appreciate a pointer or two in how to approach this.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @OleMartinGulbrandsen-4027, welcome to Microsoft Q&A forum.

If possible, could your provide us snapshot of input data and the output you expect as it become easier to exactly understand the problem statement. Also from where this datagrid is coming?

0 Votes 0 ·

Hi @OleMartinGulbrandsen-4027, please let us know the details as asked in previous comment.

0 Votes 0 ·

0 Answers