Forum Replies Created

Viewing 15 posts - 136 through 150 (of 166 total)

  • RE: How to make range for date and count?

    Thanks Andrew and sorry for the little delay.

    I need to count the column - PLcount

    Ex.

    When you join these tables then it will show following data:

    StartStopPLCount

    2008-09-01T09:00:012008-09-01T10:00:0214

    2008-09-01T16:00:002008-09-01T16:42:423

    2008-09-01T17:00:002008-09-01T17:05:002

    2008-09-04T09:00:012008-09-05T08:00:021

    Here it will be total count20

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:003

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:003

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:001

    2009-01-27T14:32:35.6295907-08:002009-01-27T14:32:35.6295907-08:001

    2009-01-27T14:32:35.6295907-08:002009-01-27T14:32:35.6295907-08:002

    Here...

  • RE: How to make range for date and count?

    Thanks Andrew.

    I am not much worried about time boundry which you have asked but its a nice consideration. I am more interested to make it in a Range/Group bucket.

    Please see...

  • RE: How to make range for date and count?

    Andrew,

    Would you mind to show me how to Bucket (Group Data Range) the data?

    I would like to make a group Data Range from my two tables data which counts how...

  • RE: How to make range for date and count?

    Hi Andrew,

    Thanks for your help anyway.

  • RE: How to make range for date and count?

    Hi Andrew,

    If you get a chance to look into, really appreciated your help!

  • RE: How to make range for date and count?

    Andrew,

    Thanks once again for your such a great help!

    I really appreciate your time and help to simplify my problem.

    Its really magic for new for sql server guys like me.

    It runs...

  • RE: How to make range for date and count?

    Thanks Andrew.

    I have tried your query and its works fine when i am running by itself but when i am including with SP_SEND_DBMAIL then it throwing follwoing error:

    Msg 102, Level...

  • RE: How to make range for date and count?

    Thanks lot.

    I will try to implement and let you know.

    These are all test data but i will get soon real data from the user once they start to test the...

  • RE: How to make range for date and count?

    Thanks once again for your help and detail explaination!

    Let me explain again if i have mis communicated.

    I have two columns and data are like:

    2008-09-01T09:00:012008-09-01T10:00:02

    2008-09-01T16:00:002008-09-01T16:42:42

    2008-09-01T17:00:002008-09-01T17:05:00

    2008-09-04T09:00:012008-09-05T08:00:02

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:00

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:00

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:00

    2009-01-27T14:32:35.6295907-08:002009-01-27T14:32:35.6295907-08:00

    2009-01-27T14:32:35.6295907-08:002009-01-27T14:32:35.6295907-08:00

    2009-01-28T12:27:10.910625-08:002009-01-28T12:27:37.42625-08:00

    2009-01-28T13:07:07.80125-08:002009-01-28T13:07:38.504375-08:00

    2009-01-22T10:48:57.9266883-08:002009-01-22T10:49:19.5967602-08:00

    2009-01-22T10:49:30.0178731-08:002009-01-22T10:50:43.0458513-08:00

    2009-01-26T11:51:22.9243673-08:002009-01-26T11:52:46.7363309-08:00

    2009-01-26T11:54:00.6108581-08:002009-01-26T12:03:19.0291592-08:00

    2009-01-26T12:06:13.2467942-08:002009-01-26T13:08:10.285505-08:00

    2009-01-26T13:12:15.6589346-08:002009-01-26T13:12:31.5494579-08:00

    2009-01-26T15:25:05.4829274-08:002009-01-26T15:54:57.3152096-08:00

    2009-01-26T15:55:14.4557249-08:002009-01-26T16:27:32.6933201-08:00

    2009-01-26T16:28:24.4429889-08:002009-01-26T16:28:29.0523344-08:00

    I need to count something with and...

  • RE: How to make range for date and count?

    Thanks once again Andrew!

    I tried to run your suggested DateDiff with SUBSTRING but i am confused after looking data, please correct me if i confused myself wrong way without proper...

  • RE: How to make range for date and count?

    Thanks much Andrew for your quick response.

    Now I got you what you are pointing for local time.

    Thanks for your detail clarificaiton.

    I just need to determine the difference between the Start...

  • RE: How to make range for date and count?

    Thanks once again!

    Honestly, we will be getting user data from different country so it won't be local ( Ihope i have answered correctly).

    But from the recent data, i have the...

  • RE: How to make range for date and count?

    Thanks Andrew.

    My start and stop field is in VARCHAR but its in following format:

    2008-09-01T09:00:012008-09-01T10:00:02

    2008-09-01T16:00:002008-09-01T16:42:42

    2008-09-01T17:00:002008-09-01T17:05:00

    2008-09-04T09:00:012008-09-05T08:00:02

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:00

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:00

    2009-01-27T14:32:37.7389657-08:002009-01-27T14:32:37.7389657-08:00

    2009-01-27T14:32:35.6295907-08:002009-01-27T14:32:35.6295907-08:00

    2009-01-27T14:32:35.6295907-08:002009-01-27T14:32:35.6295907-08:00

    I tried to run your following sql but its throw me an conversion error:

    DATEDIFF(day, [Start], [Stop]) AS...

  • RE: How to make range for date and count?

    Thank you very much!

    I will double check and let you know.

    Thanks!

  • RE: How to make range for date and count?

    hi,

    I have another question related to this:

    I am using datediff function in sql server 2005 but its still retrieve the data if its only time different for the same day.

    My...

Viewing 15 posts - 136 through 150 (of 166 total)