This is a discussion on request data from specified time within the SQL Server forums, part of the Microsoft SQL Server category; --> I have a table (Tickdata; Contract,Price,Timecreated) which stores Timecreated as datetime. I need to request the maximum price where ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a table (Tickdata; Contract,Price,Timecreated) which stores Timecreated as datetime. I need to request the maximum price where the Timecreated is greater than some value, in this case 9/13/2004 3:09:29 PM. How exactly do I get data from a specified time? Thanks |
| |||
| On Mon, 13 Sep 2004 16:05:36 +1000, Fred wrote: >I have a table (Tickdata; Contract,Price,Timecreated) which stores >Timecreated as datetime. I need to request the maximum price where the >Timecreated is greater than some value, in this case 9/13/2004 3:09:29 PM. > >How exactly do I get data from a specified time? > >Thanks Hi Fred, SELECT MAX(Price) FROM TickDate WHERE Timecreated > '2004-09-13T15:09:29' ? Best, Hugo -- (Remove _NO_ and _SPAM_ to get my e-mail address) |
| ||||
| Works like a charm. Thanks "Hugo Kornelis" <hugo@pe_NO_rFact.in_SPAM_fo> wrote in message news:2toak01nidr0q0d8bqhahn4oa21lbkh1kn@4ax.com... > On Mon, 13 Sep 2004 16:05:36 +1000, Fred wrote: > > >I have a table (Tickdata; Contract,Price,Timecreated) which stores > >Timecreated as datetime. I need to request the maximum price where the > >Timecreated is greater than some value, in this case 9/13/2004 3:09:29 PM. > > > >How exactly do I get data from a specified time? > > > >Thanks > > Hi Fred, > > SELECT MAX(Price) > FROM TickDate > WHERE Timecreated > '2004-09-13T15:09:29' > > ? > > Best, Hugo > -- > > (Remove _NO_ and _SPAM_ to get my e-mail address) |
| Thread Tools | |
| Display Modes | |
|
|