Viewing 15 posts - 91 through 105 (of 3,956 total)
dav_wu (4/28/2015)
April 28, 2015 at 5:33 pm
Alan.B (4/27/2015)
dwain.c (4/27/2015)
Alan.B (4/27/2015)
Jeff Moden (4/26/2015)
Alan.B (4/26/2015)
April 27, 2015 at 8:41 pm
Alan.B (4/27/2015)
Jeff Moden (4/26/2015)
Alan.B (4/26/2015)
Over the past year I have heard some folks around here talk about a "set based loop". What's that all about? Can someone provide an example?
There...
April 27, 2015 at 6:42 pm
Lynn Pettis (4/27/2015)
SQLRNNR (4/27/2015)
Lynn Pettis (4/27/2015)
Ed Wagner (4/27/2015)
Grant Fritchey (4/27/2015)
Hey Steve! Where did you get pictures of my cousin?I never thought of you as having a strong feline side. 😀
How...
April 27, 2015 at 5:45 pm
Jeff Moden (4/22/2015)
Why not just use MAX(columname) OVER () in any queries you have?
I would have suggested a schema-bound iTVF instead of a sUDF, as in the end you'll be...
April 23, 2015 at 6:29 pm
Lowell (4/22/2015)
SELECT dbo.pr_test(DEFAULT)
OK now. That's about the coolest thing I've seen today. Didn't know you could do that.
April 23, 2015 at 6:06 pm
Jeff Moden (4/22/2015)
Hmmm... depending on what it is, joint article?
Possibly... has to do with random numbers.
It is one of those things that doesn't play well in email because I suspect...
April 22, 2015 at 8:13 pm
Jeff Moden (4/22/2015)
dwain.c (4/22/2015)
Jeff - that is extremely clever!
Heh... thanks Dwain. As you can immediately tell, I've never had to do such a thing before. 😀 I've...
April 22, 2015 at 8:03 pm
Jeff - that is extremely clever!
April 22, 2015 at 7:48 pm
What? No thank you?
April 22, 2015 at 6:43 pm
serg-52 (4/22/2015)
Nice solution. And easily extendable to milliseconds or years.May i suggest a little tweak
Months and hours too!
Of course, please tweak away. It was just a little something I...
April 22, 2015 at 3:49 am
serg-52 (4/22/2015)
dwain.c (4/21/2015)
Recursion is not needed here if this is really being done in SQL 2012.
If i got OP's task right, recursion is inevitable. As far as i understand...
April 22, 2015 at 2:07 am
Jeff Moden (4/21/2015)
I also agree with Paul White. Write code that won't fail whenever possible. 🙂
Me too! Makes testing a whole lot simpler and quicker!
April 21, 2015 at 11:29 pm
SELECT LastWeek=d-1,LastWeek1=d-2,LastWeek2=d-3
FROM (SELECT DATEPART(ww, GETDATE())) a (d);
Edit: Do you understand why I suggest this instead of what has come before?
April 21, 2015 at 6:47 pm
Viewing 15 posts - 91 through 105 (of 3,956 total)