Viewing 15 posts - 106 through 120 (of 5,393 total)
Solomon Rutzky (3/21/2016)
spaghettidba (3/21/2016)
Jeff Moden (3/20/2016)
spaghettidba (3/17/2016)
What I...
March 21, 2016 at 3:56 pm
Jeff Moden (3/20/2016)
spaghettidba (3/17/2016)
What I ended up doing...
March 21, 2016 at 4:53 am
Luis Cazares (3/18/2016)
I prefer to use a nice pattern instead of learning ASCII values. But that's just me. 😀
Me too, but for some reason it didn't catch all the "bad"...
March 18, 2016 at 7:51 am
SELECT *
FROM @sampleData AS s
CROSS APPLY (
SELECT Name = (
SELECT SUBSTRING(s.name, number, 1) AS c
FROM master.dbo.spt_values
WHERE type = 'P'
AND number > 0
AND (
ASCII(SUBSTRING(s.name, number, 1)) BETWEEN 97 AND 122
OR
ASCII(SUBSTRING(s.name, number,...
March 18, 2016 at 5:21 am
This should do the trick:
DECLARE @sampleData TABLE (
Id int,
Name nvarchar(50)
)
INSERT INTO @sampleData VALUES
(1 ,'test“te d''abc')
,(2 ,'anr¤a')
,(3 ,' gs-re-C“te d''ab')
,(4 ,'M‚fe, DF')
,(5 ,'R™temd')
,(6 ...
March 18, 2016 at 3:48 am
I see no variable passed to the query for sp_send_dbmail. You're concatenating the value '22' to the query, which is the only way to execute queries with parameters in dbmail....
March 18, 2016 at 2:03 am
Why is the output wrong. What is the expected output?
March 18, 2016 at 1:54 am
Better?
SELECT ENC.PatientID,
ENC.DischargeDate,
ITV.InterventionDate,
Days = DATEDIFF(day, DischargeDate, InterventionDate)
FROM #Encounters AS ENC
OUTER APPLY (
SELECT TOP 1 *
FROM #Intervention AS ITV
WHERE PatientID = ENC.PatientID
AND InterventionDate <= DATEADD(day, 2, ENC.DischargeDate)
AND InterventionDate >...
March 17, 2016 at 6:19 am
This is one way to do it:
SELECT *
FROM #Encounters AS ENC
CROSS APPLY (
SELECT TOP 1 *
FROM #Intervention AS ITV
WHERE PatientID = ENC.PatientID
AND InterventionDate <= DATEADD(day, 2, ENC.DischargeDate)
AND InterventionDate > ENC.DischargeDate
ORDER...
March 17, 2016 at 5:45 am
Option1: SQL Power Doc
https://sqlpowerdoc.codeplex.com/
Option2: MAPS
https://technet.microsoft.com/en-us/solutionaccelerators/dd537572.aspx
March 17, 2016 at 3:53 am
Duplicate post, replies here please: http://www.sqlservercentral.com/Forums/FindPost1770164.aspx
March 17, 2016 at 3:31 am
jasona.work (3/16/2016)
So, several (most) of my servers have silly-small C:\ drives for the OS. This hasn't been a problem until recently, now those drives...
March 17, 2016 at 2:03 am
Solomon Rutzky (3/14/2016)
Jeff Moden (3/14/2016)
I'll have to agree to strongly disagree with most everything you've said and the reasons you've said them.
Well, for reasons heretofore stated and unstated, whether expressly...
March 14, 2016 at 10:18 am
FWIW, I agree with Solomon here.
March 14, 2016 at 4:11 am
Basically, you have something like this:
SELECT a bunch of columns
FROM sys.databases AS DB -- This is the LOCAL list of databases
LEFT JOIN [Linkedservername]. msdb.dbo.backupset AS BS -- This...
March 10, 2016 at 6:39 am
Viewing 15 posts - 106 through 120 (of 5,393 total)