Viewing 15 posts - 271 through 285 (of 860 total)
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
July 19, 2012 at 3:54 pm
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...
July 19, 2012 at 3:49 pm
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.
July 19, 2012 at 3:25 pm
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#...
July 19, 2012 at 2:05 pm
tacy.highland (7/19/2012)
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...
July 19, 2012 at 12:20 pm
tacy.highland (7/18/2012)
One question on how it's calculating: If i have a route starting at 0900 and...
July 19, 2012 at 6:40 am
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...
July 18, 2012 at 2:28 pm
tacy.highland (7/18/2012)
July 18, 2012 at 2:00 pm
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...
July 18, 2012 at 1:39 pm
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...
July 18, 2012 at 11:57 am
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...
July 18, 2012 at 8:32 am
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...
July 17, 2012 at 4:12 pm
SQLSACT (7/17/2012)
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...
July 17, 2012 at 4:01 pm
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
July 17, 2012 at 3:43 pm
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...
July 17, 2012 at 3:38 pm
Viewing 15 posts - 271 through 285 (of 860 total)