Viewing 15 posts - 8,626 through 8,640 (of 8,753 total)
ado-712642 (4/5/2014)
April 5, 2014 at 1:39 pm
J Livingston SQL (4/5/2014)
I "thought" that UNBOUNDED PRECEDING/FOLLOWING was introduced in 2012...so not available in 2008?
may well be wrong.
nevertheless it provide a solution...
I wonder what is...
April 5, 2014 at 1:10 pm
Here is the code 😎
DECLARE @POLIGON GEOMETRY;
/* ms sample from BOL */
SET @POLIGON = geometry::STPolyFromText('POLYGON ((5 5, 10 5, 10 10, 5 5))', 0);
;WITH NN1(N) AS (SELECT NM.N FROM...
April 5, 2014 at 12:19 pm
J Livingston SQL (4/5/2014)
some significant changes between these two editions.....which one is in use now?
Lets do both with the same solution
😎
/* SAMPLE DATA */
SELECT
X.NUM
INTO #MY_NUMBERS
FROM
(
...
April 5, 2014 at 11:57 am
Join the two tables and use ISNULL/COALESCE to replace NULLs
😎
DECLARE @TABLE_A TABLE
(
SNO INT ...
April 5, 2014 at 6:26 am
AndrewSQLDBA (4/4/2014)
Happy Friday
I am dealing with what I believe is Oracle that is the source of a SQL View.
I am seeing a data type of Integer in the View,...
April 5, 2014 at 3:43 am
This can be done by shifting each point on the line by x and y (@OFFSET_X/Y in the code)
😎
DECLARE @line geometry = 'LINESTRING(1 1, 2 2, 3 3, 4 4,...
April 5, 2014 at 12:48 am
Use a CTE or a table with the additional email addresses to be added, cross join to a filtered set with code replacement and union the result to the original...
April 4, 2014 at 11:37 pm
WayneS (4/3/2014)
This is an excellent modification to an already excellent function. Very well done!!! (And it was such a simple change at that.)
Jeff Moden (3/24/2014)
April 3, 2014 at 11:07 pm
Ran your example through on
noticed the grouping is incorrect, if it is on lccs/lcc/, you will get multiple lines of subtotal.
NaN could be null or empty string.
😎
April 3, 2014 at 10:44 pm
What about SSDT (Sql Server Data Tools) ?
😎
April 3, 2014 at 2:23 pm
Luis Cazares (4/3/2014)
Eirikur Eiriksson (4/3/2014)
Straight forward using Window functions
Isn't that over complicating something that could be achieved like this?
SELECT PONum
,POLineNum
,POSublineNum
...
April 3, 2014 at 2:04 pm
Straight forward using Window functions
DECLARE @POSTUFF TABLE
(
PONum INT ...
April 3, 2014 at 1:24 pm
Think of the columns in the group by as buckets, any aggregation is then applied to each bucket;
ColAColB
A1
B2
A2
B3
Group by ColA -> Aggregation on B
A (1,2)
B (2,3)
or in other words, it...
April 3, 2014 at 12:53 pm
wBob (4/3/2014)
See my reply here on a similar issue:http://www.sqlservercentral.com/Forums/Topic1557258-3411-2.aspx
Thanks!
😎
April 3, 2014 at 12:45 pm
Viewing 15 posts - 8,626 through 8,640 (of 8,753 total)