Viewing 15 posts - 5,491 through 5,505 (of 7,185 total)
Yes, and don't use NOLOCK in production code unless you don't mind getting approximate, as opposed to accurate, data.
John
March 15, 2011 at 9:55 am
Pete
Something like this?
SELECT COUNT(*)
FROM MyTable t1
JOIN Mytable t2
ON t1.ProcessId = t2.ProcessId
AND t2.Month = t1.Month + 1
AND t1.Compliant <> t2.Compliant
John
March 15, 2011 at 9:48 am
Mike
I don't think there's an easy way of doing this. One option is to restore last night's backup to a different server (or a different database on the same...
March 15, 2011 at 9:24 am
1. No, you should have identical hardware for each node. I can't remember whether this is compulsory or just highly recommended. You should also check that the hardware...
March 14, 2011 at 9:32 am
Philippe
Have you tried a DDL trigger? You should be able to automatically grant permissions on an object as soon as it's created. I've never tried using a trigger...
March 14, 2011 at 9:04 am
I suppose you could create a job on the second server that removes that login's access to your database at a specified time.
John
March 11, 2011 at 8:19 am
Something like this?
WITH PatientNos AS (
SELECT ROW_NUMBER () OVER (ORDER BY NEWID()) AS PNo
, *
FROM Patients
)
UPDATE PatientNos
SET PatientName = 'Patient' + CAST (PNo as varchar(7))
John
March 11, 2011 at 3:33 am
Your CASE statement looks OK, although you haven't said exactly what you're trying to achieve with it. As I said, please provide DDL, data and expected results.
John
March 11, 2011 at 2:47 am
I think we're going to need some table DDL and sample data in order to help you with this, please.
Do you get an error message when you run that query,...
March 11, 2011 at 2:30 am
I don't think your query as it stands at the moment will work anyway. The line that begins "set @qry=" seems to end very abruptly.
Having said that, since it's...
March 11, 2011 at 1:54 am
Tim
No, they won't. As long as there are no precedence constraints between the level 3 packages, they'll all run to completion (whether that be success or failure).
John
March 8, 2011 at 5:48 am
I ran into this issue myself recently. I can't remember how I solved it, but I found some good examples by searching the web and modified those. The...
March 7, 2011 at 6:32 am
I prefer the one where you have a go at writing it yourself, and post back with what you've tried if you run into any particular problems.
John
March 7, 2011 at 6:28 am
Lakshman
Why do you want to use row locks? Is there a reason why you don't want to let SQL Server decide what locks to use, and escalate to page...
March 7, 2011 at 6:15 am
No, I think you'd need to rewrite SP1 so that it only returns one result set, then write another stored procedure to return the second result set.
John
[Edit - rewrote reply...
March 7, 2011 at 5:57 am
Viewing 15 posts - 5,491 through 5,505 (of 7,185 total)