Viewing 15 posts - 5,116 through 5,130 (of 7,597 total)
Don't name the constraint, as constraint names have to be unique.
ALTER TABLE dbo.test
ADD PRIMARY KEY CLUSTERED
( ReportRunTime, VisitID, SourceID, BaseID, OccurrenceSeqID, [DateTime], SeqID, QueryID, Response );
April 30, 2015 at 12:19 pm
SELECT MONTH(Anniversaire) AS MM, DAY(Anniversaire) AS DD, Anniversaire, Prenom, Nom
FROM Tbl_RH_Pharmacie
WHERE (Anniversaire IS NOT NULL AND Anniversaire <> '') AND
1 = CASE WHEN...
April 30, 2015 at 8:30 am
I wonder why Transaction log of MASTER can be full ( The recovery model is simple )
You can't back up a log in simple recovery model (because the log would...
April 30, 2015 at 8:14 am
I believe SQL will compile all statements when the proc is loaded, so there's overhead there.
If you do this, though, at least make it as efficient as possible by using...
April 29, 2015 at 5:18 pm
Since the default db is master, often things get built there by accident. You can create a DDL trigger to prevent that from happening again, if you want.
You can...
April 29, 2015 at 5:13 pm
Make sure the log file has enough unused space to handle the bulk-insert logging before the insert starts. Dynamically growing the log file is an extremely slow process. ...
April 29, 2015 at 5:08 pm
sum(case when (coalesce(a.status,ae.status) = 'A')
and (ae.excuse is null or ae.excuse = 'U')
...
April 28, 2015 at 3:52 pm
The MSsubscriptions table has a column:
subscription_type
that identifies which it is.
April 28, 2015 at 3:46 pm
SELECT *, DATEADD(HOUR, HourPlanned, DATEADD(DAY, DATEDIFF(DAY, 0, lnDateDone), 0))
FROM (
SELECT lnDateDone = '2014-04-09 13:22:31.544', HourPlanned = 14
) AS test_data
Edit: Corrected calcs and added test data.
April 27, 2015 at 2:03 pm
I think (hopefully) all the conditions except a NULL (incoming) @Gender can be handled by:
(@Seeking IS NULL OR p.Gender = @Seeking) AND p.Seeking = @Gender
What "matches" do you want to...
April 27, 2015 at 9:51 am
Don't add an id as a PK, just use MsgDate and MsgTime as the (nonunique) clustering keys. That's how you'll lookup and process this data anyway.
I can't imagine how...
April 24, 2015 at 3:46 pm
I'd consider clustering by only customer_id, unless the selects themselves order by both customer_id and thing_id.
I'd also use a lower fillfactor for these indexes, maybe starting somewhere between 80% and...
April 24, 2015 at 2:08 pm
Do you really search this table by NoteType without specifying a CreateDate range? Could you specify CreateDate range?
This table should be clustered on CreateDate, not on identity; this is...
April 24, 2015 at 1:58 pm
CELKO (4/24/2015)
Of course there is, since you can cast the number to a string any time you want, although you'd never need to compute a check digit that's already...
April 24, 2015 at 1:23 pm
You could also do searches for similar jobs and see what their job descriptions look like. After all, one of the greatest documents in history, the "Declaration of Independence",...
April 24, 2015 at 8:13 am
Viewing 15 posts - 5,116 through 5,130 (of 7,597 total)