Select records form lasthour

  • Then your code should work. In the MyTable DDL, is [date] a field type of DATETIME, or is it VARCHAR() or something else?

    There's no other reasons that code should be failing.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Craig Farrell (2/17/2011)


    Then your code should work. In the MyTable DDL, is [date] a field type of DATETIME, or is it VARCHAR() or something else?

    There's no other reasons that code should be failing.

    It's a DATETIME. I dont know what is wrong. I've tryed everything. Really dont know.... Mayte to create a new table...

  • Interesting... now i've deleted old data and inserted again with the same date values as the previous deleted and now it works fine. Really dont now why is that happening.

    Now it works fine. Thank again on your help. I appreciate that.

  • Craig Farrell (2/16/2011)


    and we haven't gotten to 8/2/2011 yet (I read it as 2010 for some reason) so yes, it's after an hour ago... LOL

    DD/MM/YYYY 😉 It's why even non-U.S. people should post using the yyyy-mm-dd format. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (2/17/2011)


    Craig Farrell (2/16/2011)


    and we haven't gotten to 8/2/2011 yet (I read it as 2010 for some reason) so yes, it's after an hour ago... LOL

    DD/MM/YYYY 😉 It's why even non-U.S. people should post using the yyyy-mm-dd format. 😉

    Yeah, that's why I had him try the temp table bit and # of rows returned. Really odd.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply