Viewing 15 posts - 2,251 through 2,265 (of 7,187 total)
October 12, 2016 at 7:22 am
I can't see any value in backing up a database that is a copy of another database that's already being backed up.
Also, are your backup files really on the same...
October 12, 2016 at 3:03 am
That's all a bit vague, although if I had to guess I'd say that you're missing some parentheses around your AND and OR conditions. ANDs are evaluated before ORs...
October 11, 2016 at 9:34 am
A UNC path starts with a double backslash.
John
October 10, 2016 at 10:17 am
H:\ isn't a network share - it's a mapped drive. Drives that you have mapped are visible only to you, not to the SQL Server service account. Try...
October 10, 2016 at 9:50 am
What do you get if you run this?EXEC xp_cmdshell 'dir C:\Users\moody\Desktop\api.json'John
October 10, 2016 at 9:21 am
You've lost me, I'm afraid. Please will you post the whole statement and the whole error message?
Thanks
John
October 10, 2016 at 8:42 am
Here's one way of doing it:WITH SecurityExamples (Line, Value) AS (
SELECT 1, 'G H2' UNION ALL
SELECT 2, 'G-M3' UNION ALL
SELECT 3, 'G U4' UNION ALL
SELECT 4, 'G-X2' UNION ALL
SELECT 5,...
October 10, 2016 at 4:57 am
Something like this:
IF EXISTS (
SELECT ID
FROM Inserted i
JOIN Deleted d ON D.ID = I.ID AND D.Department <> I.Department
)
BEGIN
<Your INSERT statement here>
EXEC sp_send_dbmail <mail parameters here>
END
John
October 6, 2016 at 7:37 am
Use the Inserted virtual table to compare the value of Department before and after, and only insert those rows where it differs.
John
October 6, 2016 at 7:22 am
BWFC (10/6/2016)
And finally, is anybody going to be at SQL Relay in Leeds tomorrow?
Yes. See you there!
John
October 6, 2016 at 2:22 am
Or create a unique filtered index to avoid the need for a trigger:CREATE UNIQUE INDEX UQ_CustomStudent_personID_value_attributeID
ON dbo.CustomStudent (personID,value,attributeID)
WHERE value = '17'
AND attributeID = '9875'
John
October 6, 2016 at 2:07 am
You haven't given any examples of exactly what you're trying to prevent, but from your description, it sounds as if you could do all this (except the e-mail) with CHECK...
October 5, 2016 at 3:01 am
NineIron (10/4/2016)
I don't get how the cross apply is working. My limited experience is using it like a join. I'm using 2008 Express but, I suppose I could download 12.
The...
October 4, 2016 at 5:37 am
Yes, that's broadly what I had in mind. The reason I thought it more complicated is that my definition of median includes taking the average of the two middle...
October 4, 2016 at 5:29 am
Viewing 15 posts - 2,251 through 2,265 (of 7,187 total)