• avishain (6/24/2013)


    J Livingston SQL (6/24/2013)


    do you have any other columns available that hold date info ...eg yyymmdd?

    also what are you expecting to happen when the end time is two or more days after the start time

    I DO HAVE ANOTHER COLUMNS

    Date_StartHour_StartDate_EndHour_End

    2011062110423220110621121805

    as you can see, i got 2 columns referring to the date and 2 columns referring to the time (exact hour)

    the date format is yyyymmdd

    the time format is hhmmss

    thank you for helping ๐Ÿ™‚

    What datatype are the columns?

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden