Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Favorites |
infavorites:mine infavorites:1234 |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
SQL Server 2005 (major build version 9.00.xxxx). Please also tag sql-server.
3
votes
The difference between one and two queries may not be as large as you'd think. For example, compare this query:
declare @t table (id int)
insert into @t select id from Table1 where col1 = 7
update Ta …
answered Apr 7 '12 by Andomar
2
votes
A well known SQL Server expert, Paul Randal, recommends that the number of tempdb data files should equal the number of logical cores. So if you have 4 CPU's with hyperthreading, you'd create 8 tempd …
answered Sep 4 '12 by Andomar
1
vote
This line says there can be no LastAssignment turned on:
CHECK (dbo.FN_IsLastAssigned(ClaimId)=0)
It should probably be:
CHECK (dbo.FN_IsLastAssigned(ClaimId)<=1)
Note that check constraints li …
answered Jul 5 '12 by Andomar
20
votes
You could create a stored procedure that runs the job. You can use with execute as owner to run the stored procedure as the database owner. That way, the users themselves don't need permissons on sp …
answered Dec 31 '09 by Andomar
12
votes
The query optimizer treats an inline table valued function exactly like a view:
CREATE FUNCTION dbo.InlineUdf(@arg1 int)
RETURNS TABLE
AS
RETURN
(
... your query here ...
);
A multi-statement …
answered Aug 14 '12 by Andomar
5
votes
Drop any foreign keys
Create new tables with int instead of tinyint
Move the rows over per batch of 1000 (insert them in the new table, delete them from the old one)
Drop the old tables
Rename the ne …
answered Jun 27 '12 by Andomar
12
votes
For SQL Server 2008 and up, you can disable promotions for the linked server. It's on the Advanced property tab, or you can script it like:
EXEC master.dbo.sp_serveroption
@server=N'YourLinkedS …
answered Jul 17 '13 by Andomar