Viewing 15 posts - 2,656 through 2,670 (of 4,085 total)
Lynn Pettis (5/18/2016)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 3:46 pm
The data provided only has data for 2013-12 and 2014-01, so there is only one month in the "current" year, which is why you are only getting one row. ...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 2:44 pm
yb751 (5/18/2016)
;WITH MyOriginalTable([TransactionID],[LineItemNumber],[Amount])
AS
(
SELECT 1,1,1.00 UNION ALL
SELECT 2,1,2.00 UNION ALL
SELECT 2,2,3.00 UNION ALL
SELECT 2,3,1.00 UNION ALL
SELECT 3,1,4.00 UNION ALL
SELECT 3,2,3.00...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 2:30 pm
There are four options associated with (non-binary) collations
To the best of my knowledge, carriage return and line feed do not have alternate representations that differ on...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 1:32 pm
The answer to question 1 should be "None of the above." By definition, a correlated subquery is a subquery. Since none of the answers applies to ALL subqueries,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 12:04 pm
Ken Wymore (5/18/2016)
I rewrote the query using not exists and got the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 11:33 am
smer (5/18/2016)
The below query works on year to month ... works good but i am unable to control the date . E.g my year to date is...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 18, 2016 at 10:29 am
rivcomp (5/17/2016)
this is probably not the best way to use a CTE, a CTE is means to be re-usable across the T-SQL query and it is not meant to switch...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 2:52 pm
Try changing your CROSS APPLY to an OUTER APPLY. The CROSS APPLY filters out nodes that don't have any instances of the element specified, whereas the OUTER APPLY will...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 12:22 pm
Ray K (5/17/2016)
drew.allen (5/17/2016)
I'm going to be at SQL Saturday 517 - Philadelphia. I know that WayneS is planning to be there, because he's scheduled to present.Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 11:47 am
Look at Jeff Moden's article on Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url]. You may need to read Part 1[/url] first.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 10:57 am
I'm going to be at SQL Saturday 517 - Philadelphia. I know that WayneS is planning to be there, because he's scheduled to present.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 10:38 am
Two things:
1) You said that you were missing data? What results are you getting?
2) You xml data doesn't support the desired results. Your desired results are...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 9:52 am
You don't want to store the amount remaining, you want to calculate it on the fly using the windowed version of SUM(). Of course, your data is missing the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 9:29 am
You still haven't provided expected results.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 17, 2016 at 8:24 am
Viewing 15 posts - 2,656 through 2,670 (of 4,085 total)