Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Select query returns result beyond the range specified...? Expand / Collapse
Posted Thursday, November 13, 2008 5:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 14, 2008 6:27 AM
Points: 2, Visits: 6
Hi Members,

Im doing a select in which im specifying the date range..

"select key_id from result where started_at_date >= '2008-10-17 13:30:00' and ended_at_date <= '2008-10-17 13:30:20'"

but in the above query im getting the key_id for which the date range is out of the date range specified here.

That is im getting key_id = 5, for whcih started_at = '2008-10-18 13:30:00' and ended_at = '2008-10-18 13:30:20'

Please help me to solve this issue.

Post #602011
Posted Friday, November 14, 2008 6:19 AM



Group: General Forum Members
Last Login: Yesterday @ 11:04 AM
Points: 2,668, Visits: 19,228
please see the link below to help us figure out what's going on. Sample DDL and data will help us to solve your issues faster.



How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Post #602670
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse