Forum Replies Created

Viewing 15 posts - 271 through 285 (of 860 total)

  • RE: Create 15 min inc time matrix?

    how would you want the sum, per route or per 15 min period. which one will determine which way to go about getting the sums

  • RE: Grouping and Sorting sequential data by street address

    Here is a way to do it might not be the best but it should work

    With MyCTE (#ID,RouteID,Seq,BuildingID,StreetName,StreetNr,StreetAddInfo)

    --data changed a little so its not in alphabetical order for sequence to...

  • RE: Grouping and Sorting sequential data by street address

    some readily consumable sample data would really help to get you an answer. im currently formating your sample data and will get back to you soon.

  • RE: Create 15 min inc time matrix?

    tacy.highland (7/19/2012)


    I think so. It's taking the varchars and converting them to smalldatetime. Although, I'm not clear on why its converting the route# to .1?

    the route to route#...

  • RE: Create 15 min inc time matrix?

    tacy.highland (7/19/2012)


    Here's another trick.

    So now that the hours are defined in 15 increments, if I wanted to specify "break" periods where the route is not in service during their start/end...

  • RE: Create 15 min inc time matrix?

    tacy.highland (7/18/2012)


    I got it. (Didn't think about adding the original Tally cte into the existing one.)

    One question on how it's calculating: If i have a route starting at 0900 and...

  • RE: Create 15 min inc time matrix?

    i do hope you go through and follow through the logic of what i did and don't just blindly use it. research CTE's and Pivot tables and try to...

  • RE: Create 15 min inc time matrix?

    tacy.highland (7/18/2012)


    Thank you so much. I think you might have gotten it, looking at what your output is, but when I tried running the code I'm getting an error: "Invalid...

  • RE: Create 15 min inc time matrix?

    ok after much work here is the table insert and pivot sample to get you the output you want. this assumes much so use what you will and dont...

  • RE: Create 15 min inc time matrix?

    if you change your data structure and go with a pivot for the times to get them lined up you can use something like this:

    CREATE TABLE busroutetime (

    BusRoute INT,

    TimeOfDay INT,

    InService...

  • RE: Need help with a count.

    i have a question why branch1 has a groupid of 0 both times and branch4 has a group id of 2 and 0. i think a data set a...

  • RE: delete rows in loops of 5000 rows

    a simple google search will yeild several methods this is one:

    DECLARE @Rowcount INT = 1

    WHILE @Rowcount > 0

    BEGIN

    DELETE TOP (5000)

    FROM Tally

    SET @Rowcount = @@ROWCOUNT

    END

    and another:

    DECLARE...

  • RE: xp_cmdshell

    SQLSACT (7/17/2012)


    Hi All

    How would I setup a script to copy files from a shared location on one server, to a shared location on another server?

    The extension of the files would...

  • RE: SQL Jokes & Riddles!!!

    Luis Cazares (7/16/2012)


    Is this the right place to demonstrate how good is greater than evil, just by using SQL?

    i would like to see that

  • RE: Are the posted questions getting worse?

    SQLRNNR (7/17/2012)


    capn.hector (7/17/2012)


    Lynn Pettis (7/17/2012)


    Really???

    does not seem to be the same welsh as when i first started posting.

    or is it

    I have wondered the same thing

    maby 2 months ago or so...

Viewing 15 posts - 271 through 285 (of 860 total)