Viewing 15 posts - 2,416 through 2,430 (of 8,761 total)
BrainDonor - Friday, January 27, 2017 1:30 AM
Got one, now my previous client want's the one that was wearing it 😀
January 28, 2017 at 8:36 am
My bad with the DATEFROMPARTS method, here is a correct version with the integer math
😎,DATEDIFF(MONTH,@Birth,DATEFROMPARTS(YEAR(@Service),1,1)) / 12 AS DFPAgeAsOfJanFirst
Again and as always, you...
January 28, 2017 at 8:32 am
Just a word of warning, the XML methods posted on this thread so far are naive and ridiculously expensive, at least use the text() function to avoid the XML reconstruction...
January 28, 2017 at 8:08 am
January 28, 2017 at 7:58 am
January 28, 2017 at 3:14 am
Quick thought, if it is spilling to tempdb at times then why not simply remove the join hints and add "with recompile"?
😎
Further, have you looked into those...
January 28, 2017 at 12:40 am
Quick thought, change the WHERE clause and convert the COMMENT_DATE to a DATE, just as you do in the output.
😎
WHERE (CONVERT(DATE, q.COMMENT_DATE) >= DATEADD(DD, -1,...
January 28, 2017 at 12:27 am
You are very welcome Thomas, always happy to help.
😎
Here is another method which is equally simpleDATEDIFF(YEAR,@Birth,DATEFROMPARTS(YEAR(@Service),1,1))
Recommend that you set up a simple...
January 28, 2017 at 12:17 am
Isn't this simply a question of integer math?
😎
DECLARE @Birth DATETIME = CONVERT(DATETIME,'19921130',112);
DECLARE @service DATETIME = CONVERT(DATETIME,'20160826',112);
SELECT (DATEDIFF(MONTH,0,@Service) - DATEDIFF(MONTH,0,@Birth)) / 12 AS...
January 27, 2017 at 5:25 pm
I am planning to migrate SQL 2005 databases to 2014. As per MSDN Sql...
January 27, 2017 at 10:41 am
CREATE TABLE TestMode
(
Mode NVARCHAR(MAX),
ANS NVARCHAR(MAX)
)
DECLARE @mode NVARCHAR(MAX)
SET @mode = 'Mode1|Mode2|Mode3'
DECLARE...
January 27, 2017 at 7:04 am
set @xml=(select xml_data from Xmltable)
set @xml_convert='<?xml version="1.0"...
January 27, 2017 at 1:30 am
Quick suggestion towards a solution based on DelimitedSplit8K
😎
USE TEEST;
GO
SET NOCOUNT ON;
DECLARE @DETAILS VARCHAR(1000) = 'Item1: A100 ; Item2: B200; Item3:C300;...
January 27, 2017 at 1:02 am
January 26, 2017 at 4:47 pm
Viewing 15 posts - 2,416 through 2,430 (of 8,761 total)