Viewing 15 posts - 6,391 through 6,405 (of 7,608 total)
UPDATE CurrMonth
SET [PrevPerc] = PrevMonth.[CurrPerc]
FROM #Month CurrMonth
INNER JOIN #Month PrevMonth ON
PrevMonth.[DEPARTMENT] = CurrMonth.DEPARTMENT AND
PrevMonth.[YEAR] = CurrMonth.[YEAR] - CASE WHEN CurrMonth.[MONTH] =...
September 6, 2013 at 3:18 pm
I wouldn't use PARSENAME here because of potential side effects, for example, periods (.) in the data or brackets ([]) around a piece of data. The code below should...
September 5, 2013 at 1:12 pm
Yeah, it wasn't intended to be used that way, so my guess is it wouldn't work all that well for that. Even performance could become a real issue at...
September 5, 2013 at 1:08 pm
Something like this may do it for you:
SELECT
tn.ID, tn.Status, tn.Description, tn.[Project Number],
ColNames.ColName
FROM dbo.tablename tn
INNER JOIN (
SELECT 'FreeText01'...
September 5, 2013 at 1:04 pm
Grant Fritchey (9/4/2013)
ScottPletcher (9/4/2013)
September 4, 2013 at 5:25 pm
Grant Fritchey (9/4/2013)
ScottPletcher (9/4/2013)
Grant Fritchey (9/4/2013)
Instead I've noticed that you're probably going to have an "identity more likely than not" approach on most systems just because it makes sense.
I'd disagree...
September 4, 2013 at 5:11 pm
Grant Fritchey (9/4/2013)
Instead I've noticed that you're probably going to have an "identity more likely than not" approach on most systems just because it makes sense.
I'd disagree even with that;...
September 4, 2013 at 4:23 pm
Are schema names specified on the tables in the query? If not, what are the default schemas of the two users running the queries?
September 4, 2013 at 3:17 pm
You're quite right. There's no genuinely good reason for the "default" clustering key to be an identity column. Many people just do it by rote, without thinking about...
September 4, 2013 at 3:14 pm
SELECT
[Database],
MAX(CASE WHEN MONTH(ReportDate) = 01 THEN Size END) AS Jan,
MAX(CASE WHEN MONTH(ReportDate) = 02 THEN Size END) AS...
September 4, 2013 at 2:11 pm
Patti Johnson (9/4/2013)
IF DATABASEPROPERTYEX('archer', 'Status') = 'ONLINE'
AND EXISTS(SELECT 1 FROM sys.database_mirroring WHERE...
September 4, 2013 at 1:56 pm
Patti Johnson (9/4/2013)
IF DATABASEPROPERTYEX('archer', 'Status') = 'ONLINE'
BEGIN
use archer
SET NOCOUNT ON
END
It looks good until you execute and I...
September 4, 2013 at 1:33 pm
Try this:
IF DATABASEPROPERTYEX('archer', 'Status') = 'ONLINE'
BEGIN
...
END
September 4, 2013 at 12:26 pm
You don't want to use a function against the END_DATETIME column if you can avoid it, since any function will prevent SQL from using the full seek capabilities against that...
September 3, 2013 at 2:10 pm
Don't forget restore damaged instance. That is the most complex recovery. Particularly test for master, model and msdb.
September 3, 2013 at 2:03 pm
Viewing 15 posts - 6,391 through 6,405 (of 7,608 total)