Viewing 15 posts - 1 through 15 (of 163 total)
Are you able to change the parameter to a table-parameter?
I wish 🙂
I get the parameters from a outsite source: the people who build the website.
I have some influence on what...
November 10, 2016 at 3:14 am
Wow, . . .
Thank you both Alan and Eirikur.
I'll try your solutions, after having analysed them, and choose one of them.
They are a bit to sophisticated to me to understand...
November 7, 2016 at 12:56 pm
@ "Another question, how frequently will this be called?"
Not so often:
From March till August at max a 100 times per hour. Rest of the year almost never.
November 7, 2016 at 10:26 am
@"Quick question, how many parameter values do you expect in a single call?"
Not more then 5. It's the count of the Themes of the Trip.
The number of trips is also...
November 7, 2016 at 10:06 am
I can't place a UDF in the Database. I am a developer, not the owner. So the "shown solution" is not possible for me.
But I can use the idea (make...
November 7, 2016 at 9:43 am
Not exactly an answer to the question, but I use a field named State, Status, or Condition.
VARCHAR(1), Default '' (an empty string).
I fill this field with a Char when the...
October 23, 2015 at 3:31 am
[font="Courier New"]REPLACE(STR(@NUM, 5),' ','0')[/font]
July 22, 2015 at 3:30 am
Eirikur and Sean, thank you.
I have SqlServer 2012 on my developper machine, but the production machine is 2005 :crying:.
Now I gona try to fit my query into the...
February 6, 2015 at 1:34 pm
Yeah, a physical Tally table is a good option.
But I like the solution you gave me, a "Tally table on the fly". 😉
I met another problem when I tried to...
June 4, 2014 at 1:42 pm
Sorry, I found the solution myself in an article from Jeff Moden:
"Generation of testdata Part 1 - Generating Random Integers and Floats"
SELECT TOP (400)
June 4, 2014 at 6:25 am
[font="Tahoma"]Table Value Constructor not available in SqlServer2005[/font]
I managed to understand the code and to incorporate the example in my (far much more complex) code.
The first part:
WITH cteTally AS (
June 4, 2014 at 6:05 am
mickyT (5/22/2014)So if I'm understanding this correctly, you would like the maximum occupancy at any point in the trip rather than the occupancy at the start of the trip?
May 24, 2014 at 9:08 am
It doesn't return the expected results that you have posted, but they don't match the rules...
May 22, 2014 at 3:03 pm
Thank you for your answer.
But I don't think it is the classic gaps and islands problem.
Still I'll have a look at the article you recommended, maybe there is something...
May 22, 2014 at 2:39 pm
Ad and Jeff, thanks for your answer.
The solution presented in this article is superb.
But before I could implement it (I had to make a Tally table and the function) the...
March 21, 2014 at 2:29 am