Query dataset/datatable

D

DaveF

I have a dataset with an unknown amount of fields. The user can choose a
nuber of numeric fields in that datatable. I am making a chart out of those
fields. I need to know the minimum and maximun values of the highest value
of the selected fields. Is there a way to query that dataset/datatable to
get these values. If so, can you give me an example?
 
E

Elton Wang

I suppose you want to know count of columns in data table:
dataTbl.Columns.Count

Elton

(e-mail address removed)
 
D

DaveF

No. example....

col1 col2 col3 col4 col5
5 8 9 1 1
6 7 4 20 8
23 33 9 5 9


The user wants to see col1 , col2, and col4 in a one chart. I need to know
the max and min value between those 3 columns. So the minimum value of all 3
columns combined is 1 and the maximum value is 33
 
E

Elton Wang

In that case you can use
table.Compute("Max(columnName)","");
and
table.Compute("Min(columnName)","");
find out max value and min value for each column, then
compare them.

Elton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top