0

Hope someone can help

I am using Visual Studio 10 Languague VB

It is web based and conects to remote SQL Server
If i run a query on database connecting using Sql Server management studio
this query give correct results which is to find minimum value in a column called TIME1.

The query on database is SELECT MIN(TIME1) AS Fastest
FROM Athletes
WHERE (ATHLETE = 'Joe Bloggs') AND (Session = '600m')

This works great showing correct result under Alias column name Fastest

My problrm is i want to get this result from code behind page

here is Query in code behind page

SqlDataSource1.SelectCommand = "SELECT MIN(TIME1) from Athletes WHERE (Session ='600m') AND (ATHLETE = 'Joe Bloggs')"

I need to extract min value of TIME1 and pass it to a variable

Any help wpold be greatly appreciated

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by sandeepparekh9
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.