Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LINQ Query - Sum [with null values Column from Datatable]

Status
Not open for further replies.

Mahey

Programmer
Dec 24, 2008
52
SA
I like to calculate the total to a field [trn_qty] from Dtb1 [Datatable]. For that any ideas...?

My Query is

Dim Numbers = Dtb1.AsEnumerable()
Dim SvQy = (From n In Numbers Select n.Field(Of Decimal)("trn_qty")).Sum()

But Iam not getting any O/P. Also I don't know whether its correct or not... Any better ideas?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top