Viewing 15 posts - 1,756 through 1,770 (of 4,087 total)
The following approach is better, because there are other characters that may be entitized in XML and this approach will handle all of them in a single step.
April 5, 2017 at 11:20 am
One way to get around this is to ensure that you never divide by zero by making any zero denominator NULL.
SELECT a, b, c, cost/NULLIF(vol,0) as...
April 5, 2017 at 11:04 am
The approach using MIN will work with the sample data, but it's not clear that it will work with more complicated data. Specifically, depending on the needs of the OP,...
April 5, 2017 at 10:56 am
We would need the information about the dataset used under the Parameters tab. That's where the problem is, and we don't enough information to tell you what is wrong with...
March 30, 2017 at 2:28 pm
March 30, 2017 at 2:18 pm
For me, the biggest issue is work/life balance. I love my work, but feel that I don't have enough time to devote to the other things, particular dancing. I would...
March 30, 2017 at 12:38 pm
First, the purpose of cascading parameters is to simplify reporting by tailoring possible responses based on previous responses. The key word here being responses. The stored procedure cannot pause to...
March 30, 2017 at 11:54 am
March 29, 2017 at 2:54 pm
March 29, 2017 at 2:36 pm
March 29, 2017 at 1:02 pm
TOP(n) WITH TIES is closer to RANK() rather than DENSE_RANK(). This is the reason that both queries that use TOP(n) WITH TIES don't give the desired results. To see this,...
March 29, 2017 at 12:48 pm
Use a CTE with DENSE_RANK().
;
WITH mytable_dr AS
(
SELECT account_id, event_time, [sign],
DENSE_RANK() OVER(ORDER BY CAST(event_time AS DATE) DESC) AS dr
FROM #mytable
)
SELECT...
March 29, 2017 at 12:25 pm
March 29, 2017 at 11:36 am
March 29, 2017 at 11:11 am
Now that I'm officially unemployed, I finally got around to downloading SQL 2016 developer edition to play around with. Right now, the two most frustrating things are that they changed...
March 27, 2017 at 10:17 am
Viewing 15 posts - 1,756 through 1,770 (of 4,087 total)