|
OriginalGriff wrote: do I rewrite the code to use it?
If it ain't broke, don't fix it.
Unless you are a consultant. In which case, you fix it which breaks it then fix it again which does not work so revert back to old stuff. Then, go out for a vacation using all the big money you made from this.
"You'd have to be a floating database guru clad in a white toga and ghandi level of sereneness to fix this goddamn clusterfuck.", BruceN[ ^]
|
|
|
|
|
d@nish wrote: Unless you are a consultant. In which case, you fix it which breaks it then fix it again which does not work so revert back to old stuff. Then, go out for a vacation using all the big money you made from this.
I don't Think Griff's boss (Mrs. Griff) will go for that approach...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
|
In my - slight - defence, I only upgraded to SQL Server 2012 about 6 months ago when I found my hosting service wasn't using 2008R2 any more...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
A small note, Lead and Lag really likes Composite indices. In your example on (UserId,EnterDate)
|
|
|
|
|
Note 2.
Remember the order of execution, analytic functions are the third last to happen in a query.
Joins, filtering, aggregation all happens before the analytic functions. Only Unions and Order By happens after.
|
|
|
|
|
|
I know what you mean, but ... it's what SSMS does when you ask for a "Top 1000 rows" query, which I used to test the LAG function. And I can see why it does it; it does make a lot of sense in terms of avoiding the "missing" or "leftover" comma. But it does look bad.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Well, at least you removed those horrible brackets!
"Go forth into the source" - Neal Morse
|
|
|
|
|
They're easier to get rid of!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: it does make a lot of sense in terms of avoiding the "missing" or "leftover" comma.
Until you remove the first column from the list.
Or add a column before it.
Basically, it just moves the problem from the end of the column list to the start.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
A short inch against little sister's shelter become uncertain (12)
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
modified 18-Feb-16 4:15am.
|
|
|
|
|
inconsistent
a short inch = inc
against = on
little sister = sis
shelter = tent
inconsistent
|
|
|
|
|
Wow! That was quick...
You are up tomorrow!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
💖💗♥💔💕💌💘💕💔 (9)
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
modified 18-Feb-16 4:20am.
|
|
|
|
|
|
3W 1B
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
ok then
Valentine
but I prefer my first answer
|
|
|
|
|
Why? This one gives you a double...
You are up tomorrow here too!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I know, and I had second thoughts about posting this - I now have to compose one of these FOSW things for the first time...
|
|
|
|
|
Oh...Good luck...Personally, I find it easier, than CCC...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
NeverJustHere wrote: narcistic
Say what now?
I am not a number. I am a ... no, wait!
|
|
|
|
|
Dated form of narcissistic.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Here[^]
If it's not broken, fix it until it is
|
|
|
|
|
It actually IS rather secure, simply because of it's length
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|