Hi,
I want to get row count of a particular column only within a data table,
(total count of rows having values only, ignoring empty rows)
Thanks in advance
Mohini Nemade
Hi,
I want to get row count of a particular column only within a data table,
(total count of rows having values only, ignoring empty rows)
Thanks in advance
Mohini Nemade
Have you tried using Linq?
You can get the count with something similar to:
(From row As DataRow in mydatatable.Rows
Where Not String.IsNullOrWhiteSpace(row("mycolumnname").ToString)
Select row).Count
Good, so kindly use this method,
you will be having a name for datatable , say “dt_1”
Cheers…
You will be getting row count.
Hello @mohininemade301094,
You use this linq in the assignment activity to an interger variable.
DtTable.Rows.Cast(Of DataRow)().Where(Function(row) Not row.Item("ColName") IsNot DBNull.Value Or row.Item("ColName").ToString() <> "").Count
Regards
Balamurugan.S
Thanks! It worked well
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.