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
Results tagged with Search options user 68565

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

3
votes
Like someone said before, use it in 2 queries. select t1.id, sum(pointsup - pointsdown) as points INTO #points from table1 t1 join table2 t2 on t2.Id = t1.id where t1.ActivityTime BETWEEN '2015 …
answered Jul 2 '15 by Josh Simar
0
votes
In order to make it faster (especially if this is an initial population of a table) see about removing indexes as well.
answered Jun 15 '15 by Josh Simar
0
votes
--First Attempt SELECT Site, SiteStatus, datetime, timestarteddown = ( SELECT MAX(datetime) FROM [table] table1 WHERE table1.datetime < table.datetime ) INTO #Downtimes FROM table …
answered Jun 15 '15 by Josh Simar
4
votes
2answers
I have a query that reports back to me how much time elapsed for records to be added. I also in this query track the size of an image that was added to the database. From what I can see it looks like …
asked Aug 17 '15 by Josh Simar
3
votes
Actually, I think this is the opposite of a bug. the 2008 document states "Source and target tables must share the same filegroup" but it looks as though they only started paying attention to their ru …
answered Aug 26 '15 by Josh Simar
1
vote
There are a number of reasons why a query could take longer after a restart but the most likely (assuming it is still running) would be that the plan cache has been cleared and needs to be refreshed.
answered Jun 15 '15 by Josh Simar
1
vote
0answers
Last night I received the error on one of my servers of: Failed to allocate reserved pages: FAIL_RESERVED_PAGE_ALLOCATION 2047 I know that this has already been discussed on here some but all resolu …
asked Apr 12 '16 by Josh Simar
2
votes
The answer is in your methods. First you were trying to restore a differential over a database that is in a more recent state. You would need to restore your last full backup first (from Production) a …
answered Sep 11 '15 by Josh Simar
2
votes
Connection String should instead read: DRIVER=SQL Server;Server=$SQLServer;Database=$SQLDBName;UID=xyz;PWD=abc;
answered Sep 11 '15 by Josh Simar
1
vote
This is just a pure guess (I cannot find anything to support this), but I believe that the reason it is much slower when you perform it on your local box is that it is going through the iteration on y …
answered Jul 2 '15 by Josh Simar
0
votes
The answer placed here for future reference if needed. It looks as though this data may be in a hidden table in the master database sys schema named sysxsrvs. According to what I could find this may …
answered Nov 12 '15 by Josh Simar