I would like to select all columns in a DataTable that begin with the characters 'hz'. At the moment I am doing this:
var uploadTable = dataTable.DefaultView.ToTable(false, "locID", "hz1582", "hz1581", "hz1580", "hz1579", "hz1578", "hz1577", "hz1576", "hz1575", "hz1574", "hz1573", "hz1572", "hz1571");
However, the 'hz' columns are variable each time I run my code, so I need some way of selecting all columns in the table that begin with hz. Note also that the column 'locID' is always present and needs to be returned. So, I need something like this:
var uploadTable = dataTable.DefaultView.ToTable(false, "locID", "hz%");
Any ideas? Thanks.
hz? Or you need to select only theDataColumns without data?