Viewing 15 posts - 6,976 through 6,990 (of 8,754 total)
Here is the same code with the changed name and some explanatory comments. I noticed I had left the month sequence in the other code without using it, no need...
September 23, 2014 at 4:53 pm
jcrawf02 (9/23/2014)
September 23, 2014 at 2:55 pm
Try this for a size
😎
USE tempdb;
GO
SET NOCOUNT ON;
;WITH SAMPLE_DATA ([ID number],DateOfArrival,DateOfDeparture)
AS (SELECT * FROM (VALUES
(2031,'2014-03-20','2014-03-26')
,(1056,'2014-04-29','2014-05-03')
,(3245,'2014-06-19','2014-06-20')...
September 23, 2014 at 2:43 pm
Simple and maybe not perfect approach is like Luis mentioned, using try_parse. The drawback is that some unwanted values may parse but then again, that might be fine.
😎
;WITH TableA(Col1)
AS (SELECT...
September 23, 2014 at 2:16 pm
pitioageneral (9/23/2014)
[SSCommitted] In your solution, I have to assign both m values. That wasn't the request. Thanks anyway....
Sorry, made the assumption that you could comment out the unwanted output.
😎
September 23, 2014 at 9:17 am
More for fun, here is an alternative "solution", set to return six digits and the decimal separator.
😎
USE tempdb;
GO
SET NOCOUNT ON
/* Generate a set of numbers from 1 to
...
September 22, 2014 at 10:15 pm
mickyT (9/22/2014)
September 22, 2014 at 2:25 pm
Haven't done Weiszfeld's algorithm in TSQL, would love giving it a go as it is a good example of iterative approach which potentially could be converted into a set based...
September 22, 2014 at 1:07 pm
Steve Jones - SSC Editor (9/22/2014)
Eirikur Eiriksson (9/22/2014)
Steve Jones - SSC Editor (9/22/2014)
It's backHandful of posts missing, did you break the log chain;-)
😎
There was no chance to get the log...
September 22, 2014 at 10:46 am
Steve Jones - SSC Editor (9/22/2014)
It's back
Handful of posts missing, did you break the log chain;-)
😎
September 22, 2014 at 9:17 am
There are some other topics missing, some points also went missing, all happened more or less at the same time.
😎
September 22, 2014 at 5:17 am
Not certain what is causing the problem, nothing in the code should limit the length apart from the maximum 2Gb limit of the varchar(max). Consider the following example
😎
GO
SET NOCOUNT ON;
/*...
September 22, 2014 at 2:11 am
Thank you Gail for this nice piece!
It in fact highlights a constant battle, challenging pinhole view, missing metrics, personal opinions etc., things which far to often, but wrongly, drive optimization...
September 22, 2014 at 1:42 am
serg-52 (9/22/2014)
abhas (9/18/2014)
There are more rows for CanNum as below: and in such case its failing. I want to compare only latest two.
I can Add one more column into...
September 22, 2014 at 1:29 am
Viewing 15 posts - 6,976 through 6,990 (of 8,754 total)