Home > Software design >  Sum of row data in datatable with double quotes
Sum of row data in datatable with double quotes

Time:11-25

I want get the total of a column in a datatable which has rows with double quotes.

datatable image

I want to add both rows in LINES_DISPENSED_AMOUNT1 column.

CodePudding user response:

Since this has C# tag, I would suggest you fetch all records, then in C# loop over the values and do a value.Trim('"'). Parse values to int and do a LINQ query sum().

  • Related