Viewing 15 posts - 1,201 through 1,215 (of 4,087 total)
February 27, 2018 at 9:39 am
Here's one way to find the groups. You could also use COUNT and leave off the ELSE clause.
SELECT *, SUM(CASE WHEN FileRowID = '00' THEN 1...
February 27, 2018 at 8:40 am
On this small scale test, this solution performs better. I haven't had a chance to test on a larger scale.
SELECT *, pni.PONUMBER + REPLACE(CHAR(DENSE_RANK() OVER(PARTITION...
February 26, 2018 at 2:08 pm
February 26, 2018 at 9:52 am
February 26, 2018 at 9:47 am
You could try a CTE/ROW_NUMBER(). Since you haven't supplied your complete query I can't give you the full details, but it would be something like the following:;
WITH...
February 26, 2018 at 9:27 am
I want to convert it...
February 26, 2018 at 8:37 am
Part of the issue is that you're joining in the wrong order and part is that you need to specify a more complete condition on the join.
[code...
February 23, 2018 at 2:46 pm
CAST(STUFF([Enc Reading], 7, 0, '.') AS DECIMAL(18,3))
Drew
Updated the query, because you want to insert instead of replacing.
February 23, 2018 at 11:58 am
Finding the complement of a set by changing an equal to a not equals in a very simple query appears to be beyond some people.
Drew
February 22, 2018 at 1:28 pm
I rewrote your query to distinguish between individuals and groups. I did some simplification that may not be warranted. Specifically, I removed the cycle check, because you should not have...
February 22, 2018 at 1:04 pm
The standard way to do this is with a CTE/ROW_NUMBER() combination. You just have to get the correct order for the row number.
;
WITH CTE AS
(
February 22, 2018 at 12:33 pm
Viewing 15 posts - 1,201 through 1,215 (of 4,087 total)