Viewing 15 posts - 286 through 300 (of 3,957 total)
I tend to avoid the SUM() OVER and related functions for another reason.
The Performance of the T-SQL Window Functions[/url]
Except in cases where a query is really complex already and the...
March 8, 2015 at 7:02 pm
I don't really subscribe (generally) to the notion that breaking a query into separate pieces using temp tables makes it any easier to understand.
To me, properly formatting the query to...
March 8, 2015 at 6:52 pm
TomThomson (3/8/2015)
Jeff Moden (3/1/2015)
Solomon Rutzky (3/1/2015)
Interestingly enough, nearly all of them were wrong in the exact same way. They all did their rounding at the presentation layer.
I'm not so sure...
March 8, 2015 at 5:49 pm
marcia.j.wilson (3/6/2015)
I really hate it when I have to wade through what I’d call “stream of consciousness” or write-only SQL. This...
March 8, 2015 at 5:45 pm
lshanahan (3/6/2015)
My scenario wasn't nearly as complex, but this article (with appropriate...
March 8, 2015 at 5:43 pm
omarlopez7 (3/6/2015)
"Last_Status_DT >= '2013-10-25'
AND Last_Status_DT < '2013-10-29';"
For this one
"Last_Status_DT between '2013-10-25' and '2013-10-29';"
And...
March 8, 2015 at 5:41 pm
SQLRNNR (3/6/2015)
dwain.c (3/5/2015)
SQLRNNR (3/5/2015)
dwain.c (3/5/2015)
Is it just that it's been so long that I haven't posted one, or does the Article Contribution Center (article editor) not play well with IE11?
I...
March 8, 2015 at 5:36 pm
SQLRNNR (3/5/2015)
dwain.c (3/5/2015)
Is it just that it's been so long that I haven't posted one, or does the Article Contribution Center (article editor) not play well with IE11?
I would say...
March 5, 2015 at 4:32 pm
Is it just that it's been so long that I haven't posted one, or does the Article Contribution Center (article editor) not play well with IE11?
March 5, 2015 at 2:02 am
Late to the party, but perhaps this does what you're looking for:
WITH SampleData (s) AS
(
SELECT 'Admin -- Assistants'
UNION ALL SELECT 'Finance --...
March 4, 2015 at 5:54 pm
I have the distinct impression that my under-caffeinated brain is missing something here, but can't you just skip the first step and do something like this?
SELECT id, account, deposit, rtotal,...
March 4, 2015 at 5:39 pm
Solomon Rutzky (3/4/2015)
dwain.c (3/1/2015)
March 4, 2015 at 5:07 pm
Greg Snidow (3/3/2015)
dwain.c (3/1/2015)
Thanks for saying it was an "excellent article" even with such discrepancies. 😀 Glad you felt like being generous today.
Excellent article indeed Dwain. Especially from a...
March 4, 2015 at 4:56 pm
To me this looks like a combination of a "data smear" and a running totals problem.
Perhaps you'll find some ideas here:
Filling In Missing Values Using the T-SQL Window Frame[/url]
March 2, 2015 at 5:44 pm
MaggieW (2/26/2015)
Looks like you need to use recursive CTE. But I don't understand your question and your output requirement
rCTEs are not the only way, and often aren't the fastest way:
March 2, 2015 at 5:29 pm
Viewing 15 posts - 286 through 300 (of 3,957 total)