Viewing 15 posts - 1,186 through 1,200 (of 5,504 total)
to get the ort order right, replace "order by ro.tripid;" with "order by MIN(tt.[time]) ;"
Regarding the dynamic part: would it be an option to have the "real" column names in...
July 25, 2011 at 10:37 am
The idea of an identity column per table is to uniquely identify a row in a table. The scope of this identity value is the table the column belongs to...
July 25, 2011 at 5:29 am
Ok, here's the static version based on your sample data:
; WITH routeorder as
(
SELECT
t.*,
rs.stpid,
rs.num,
-- assign a sequential number to each stop for a specific route
-- regardless whether...
July 25, 2011 at 2:27 am
Sridoc2020 (7/24/2011)
Do you know how I can force to accept following name in above query which contains comma18765_McHaney,Packet,DI,4.2.10_1
No. Hence my recommendation to rename the files before the import.
July 24, 2011 at 5:57 pm
It's a little late over here in Europe (almost 2am), so I'll have a look at it tomorrow if there is no reply...
July 24, 2011 at 5:46 pm
I thought about renaming or copy the files (with a more useful file name) just for the load process...
July 24, 2011 at 5:33 pm
Would it be an option to get the file name list and rename it using xp_cmdshell?
July 24, 2011 at 5:05 pm
Do you have a table holding all stops per trip in the required sequence? (including the sort order)? Something like route_stop_id (identity column for that table), [route], direction, stopnumber, stopdescription.
The...
July 24, 2011 at 3:19 pm
The question I have is: do you have the logic already build up how to deal with two identical stop names?
July 24, 2011 at 11:12 am
Solution: dynamic SQL wrapped by a SQL injection prevention algorithm.
But the picture of the completed puzzle may look ugly...;-)
I, personally, vote against such a concept: it's hard to maintain and...
July 24, 2011 at 4:08 am
You could use the DynamicCrossTab aproach as described in the related link in my signature.
If you're not familiar with the CrossTab concept, the CrossTab reference would be a good start.
There...
July 24, 2011 at 3:15 am
Please have a look at the examples provided in BooksOnLine, the SQL Server help system.
If you're struggling with modifying it to meet your requirements please post some ready to use...
July 23, 2011 at 4:13 am
mister.magoo (7/23/2011)
Thanks, and yes you can do a conditional replace using
replace value of (...) with ( if ( condition ) then "value1" else "value2" )
but my initial tests...
July 23, 2011 at 4:07 am
Some ready to use sample data as described in the first link in my signature would make it a lot easier for us to start working on the solution instead...
July 23, 2011 at 3:18 am
Viewing 15 posts - 1,186 through 1,200 (of 5,504 total)