Need some help here.
Trying to add two columns in a datatable that caters for negative numbers as well but am stack with this error.
Assign: Input array is longer than the number of columns in this table.
That’s the query am trying to use.
(From d In dtIntRecRecon.AsEnumerable
Let s = {4,6}.Sum(Function (x) Convert.ToDouble(“0” & d(x).toString.Trim.Replace(",",".")))
Let ra = d.ItemArray.Take(2).Append(s).toArray
Select dtComputed.Rows.Add(ra)).CopyToDataTable
(From d In dtIntRecRecon.AsEnumerable
Let s = {4,6}.Sum(Function (x) if( d(x).toString.Trim=“”,CDbl(“0”),Convert.ToDouble(d(x).toString.Trim.Replace(“,”,“.”)))
Let ra = d.ItemArray.Take(2).Append(s).toArray
Select dtComputed.Rows.Add(ra)).CopyToDataTable