Viewing 15 posts - 1,711 through 1,725 (of 6,037 total)
Magy (1/7/2016)
productionStarted should be tr.productionStartedpartID should be tr.partID
Thanks!
Hi Magy,
The main question is about you "untested" CTE:
SELECT ce.testerId, @partId as testId, 0 as resultCount,...
_____________
Code for TallyGenerator
January 7, 2016 at 2:33 pm
erics44 (1/7/2016)
You spoilt a good thread boys!
Define "spoilt".
It's all the matter of preferences, you know.
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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
...
_____________
Code for TallyGenerator
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),
...
_____________
Code for TallyGenerator
January 6, 2016 at 5:53 pm
Lynn Pettis (1/6/2016)
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
January 6, 2016 at 3:14 pm
Lynn Pettis (1/6/2016)
_____________
Code for TallyGenerator
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....
_____________
Code for TallyGenerator
January 6, 2016 at 2:44 pm
erics44 (1/6/2016)
_____________
Code for TallyGenerator
January 6, 2016 at 2:31 pm
Hugo Kornelis (1/6/2016)
_____________
Code for TallyGenerator
January 6, 2016 at 2:28 pm
Lynn Pettis (1/6/2016)
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
January 6, 2016 at 2:13 pm
Hugo Kornelis (1/6/2016)
_____________
Code for TallyGenerator
January 6, 2016 at 2:09 pm
Viewing 15 posts - 1,711 through 1,725 (of 6,037 total)