Viewing 15 posts - 1,711 through 1,725 (of 6,036 total)
erics44 (1/7/2016)
You spoilt a good thread boys!
Define "spoilt".
It's all the matter of preferences, you know.
January 7, 2016 at 2:05 am
Jason A. Long (1/6/2016)
But you were 11 mins too slow... 😛
Sorry, was having lunch, and did not refresh the page before hitting "Add Reply".
Did not even bother checking email notifications...
Shame...
January 6, 2016 at 6:45 pm
ALTER FUNCTION [dbo].[DelimitedSplit8K_NoCTE]
--===== Define I/O parameters
(@pString VARCHAR(8000), @pDelimiter CHAR(1))
--WARNING!!! DO NOT USE MAX DATA-TYPES HERE! IT WILL KILL PERFORMANCE!
RETURNS TABLE AS
...
January 6, 2016 at 6:28 pm
Complete version, including non-CTE on-fly Tally table:
DECLARE @pString VARCHAR(8000), @pDelimiter CHAR(1)
SET @pString = 'aaaa,,ccc,d,'
SET @pDelimiter = ','
SELECT ItemNumber = ROW_NUMBER() OVER(ORDER BY cteLen.N1),
...
January 6, 2016 at 5:53 pm
Lynn Pettis (1/6/2016)
January 6, 2016 at 3:46 pm
Luis Cazares (1/6/2016)
I'll just want some help from those who prefer subqueries over CTEs to transform one of our favorites functions.
Here you go:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[DelimitedSplit8K_NoCTE]
--===== Define...
January 6, 2016 at 3:30 pm
Luis Cazares (1/6/2016)
I'll just want some help from those who prefer subqueries over CTEs to transform one of our favorites functions.
You know, people been splitting delimited lists for many years...
January 6, 2016 at 3:14 pm
Lynn Pettis (1/6/2016)
January 6, 2016 at 3:08 pm
GilaMonster (1/6/2016)
Subqueries and CTEs are both part of a larger statement. Compilation is at the batch level, each statement in a batch gets compiled....
January 6, 2016 at 2:44 pm
erics44 (1/6/2016)
January 6, 2016 at 2:31 pm
Hugo Kornelis (1/6/2016)
January 6, 2016 at 2:28 pm
Lynn Pettis (1/6/2016)
January 6, 2016 at 2:18 pm
jaime.simancas 27970 (1/6/2016)
but CTEs have their place in making these "Sets" easier to read..
Very questionable. Very.
CTE's break the structure of Structured Query Language, moving part of FROM effectively out of...
January 6, 2016 at 2:13 pm
Hugo Kornelis (1/6/2016)
January 6, 2016 at 2:09 pm
GilaMonster (1/6/2016)
Sergiy (1/5/2016)
try to explain why CTE construction must be prefixed with ";" - there is no such requirement for any other language construction.
THROW - Previous statement must be ;...
January 6, 2016 at 3:03 am
Viewing 15 posts - 1,711 through 1,725 (of 6,036 total)