Unix Technical Forum

request data from specified time

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 04:15 AM
Fred
 
Posts: n/a
Default request data from specified time

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





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 04:15 AM
Hugo Kornelis
 
Posts: n/a
Default Re: request data from specified time

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 04:16 AM
Fred
 
Posts: n/a
Default Re: request data from specified time

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)



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:58 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com