Viewing 15 posts - 2,761 through 2,775 (of 7,187 total)
Use proper date arithmetic instead of messing around with character conversions:
SET @Start =CASE WHEN DATEPART(mi,@Date) IN (0,15,30,45)
THEN DATEADD(mi,DATEDIFF(mi,0,DATEADD(mi,-15,@Date)),0) -- subtracts 15 minutes and strips off s and ms
END
SELECT @Start
John
March 10, 2016 at 9:13 am
Brandie
I'm guessing you've set up mirroring on the server?
SELECT
l.name AS LoginName
,e.name AS EndpointName
FROM sys.server_permissions p
JOIN sys.server_principals l ON p.grantor_principal_id = l.principal_id
JOIN sys.endpoints e ON p.major_id = e.endpoint_id
WHERE p.class_desc = 'ENDPOINT'
John
March 10, 2016 at 8:03 am
The fact that the seed value wasn't stated led me to the answer. If "1" had been one of the options, it would have been more difficult, since that's...
March 10, 2016 at 7:43 am
Frank Cazabon (3/10/2016)
John Mitchell-245523 (3/10/2016)
I don't know how to turn on/off parallelism, Google here I come.
Be careful - you don't (necessarily) want to turn off parallelism on the whole server....
March 10, 2016 at 7:05 am
The error message returned to a user whose login has failed is, by design, not very detailed. You can find out more about the reason for the login failure...
March 10, 2016 at 6:41 am
Yes, and you might also try the LEAD and LAG functions if you have access to SQL Server 2012 or higher.
John
March 10, 2016 at 6:38 am
Six seconds doesn't sound unreasonable for that lot on a table that size. What maintenance do you do on your indexes? Have you tried running the queries without...
March 10, 2016 at 6:35 am
prettsons (3/7/2016)
Hi Newbie,Compress the backup folder to get more free space.
Surely a "recovery expert" wouldn't have the backups on the same drive as the database files - or have I...
March 9, 2016 at 2:14 am
Gabriel P (3/8/2016)
March 8, 2016 at 6:05 am
SELECT
ID
, Info
, Detail
, ...
March 7, 2016 at 7:54 am
sys.dm_exec_requests has a column called blocking_session_id. Do a self join on session_id = blocking_session_id and a second CROSS APPLY to get the text itself.
John
March 7, 2016 at 5:09 am
I don't know whether this is an option for you, but you can encrypt your package (or parts of it) by user key, which means nobody would ever need to...
March 7, 2016 at 4:06 am
REVERSE the string, use SUBSTRING, and then REVERSE it again.
John
March 4, 2016 at 10:00 am
I agree with others that this is a bad idea. Would you be able to tell us more about the reason for the requirement, please - we may be...
March 4, 2016 at 2:06 am
Since I can't see the picture you attached, my advice can only be very general: use a FOR XML clause to concatenate values from different rows into a single row.
John
March 3, 2016 at 2:23 am
Viewing 15 posts - 2,761 through 2,775 (of 7,187 total)