473,383 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Finding max value in dataset

Dan
I have a dataset with stock info Date, Open, Hi, Low, Close. How do I
determine the Max value of one column? How do I determine the max
value of all columns?

Thanks in advance - Dan
Nov 15 '05 #1
1 7190
Dan,

To find the max value of one column, I would just create a dataview on
the datatable and then sort the datatable on the particular column in
descending order (set the Sort property). Once you have that, you can just
take the value from the first column in the first row and you will have your
max value.

To determine the max values of all columns, just do what is mentioned in
the previous paragraph across all columns.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dan" <dl****@amfam.com> wrote in message
news:7e**************************@posting.google.c om...
I have a dataset with stock info Date, Open, Hi, Low, Close. How do I
determine the Max value of one column? How do I determine the max
value of all columns?

Thanks in advance - Dan

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Devesh Aggarwal | last post by:
Hi, I have a backup and restore module in my project. The backup uses a typed dataset object (XSD) to get the data from database and creates a xml file as the backup file (using the WriteXml...
3
by: Wilson Wu | last post by:
Hi, How can I find the field value in the dataset and then assign one of the field value to a variable ? Thanks Wilson
0
by: Doug | last post by:
I've got a strongly-typed dataset with 2 related tables in it ("Staff" and "Roles"). I want to make a change to the parent Staff row and also to its child Role row. I'm having difficulty figuring...
2
by: Lior | last post by:
Hi, I have an ASP.NET website that crashes under heavy load. I use a SQL Server DB. I get around 5500 hits per day. I keep getting the timeout expieried connection pool error. Sometimes it even...
3
by: DavidB | last post by:
New to .net....sorry if this seems repetitive I have a dataset ordered by date (SQLDataAdapter SelectCommand uses Order By) and want to find a record by a UniqueID(Identity Column). Then I want...
2
by: ElkGroveR | last post by:
Hi there! I'm using PHP to create a simple, dynamic MySQL SELECT query. The user chooses a selection from a HTML Form SELECT element's many options and submits the form via a POST action. ...
1
by: Owen Richardson | last post by:
I just started using The Login Objects and the CreateUserWizard creates a number of fields including Email address and i cant figure out how to reference it: intellisense tells me that...
3
by: mroffey | last post by:
Hi everyone, I've been having this problem and I've searched high and low, but I can't seem to find the answer to what is probably a very simple solution. In a nutshell, I have a nested...
7
by: Brad Baker | last post by:
I am trying to programmatically set a placeholder control in csharp which is nested inside a repeater control between <ItemTemplateand </ItemTemplate> tags, however I am running into problems. I've...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.