Viewing 15 posts - 61 through 75 (of 131 total)
I found myself using one just the other day, and although it was by far the neatest and most readable option for the logic I was using, I still felt...
December 22, 2011 at 3:25 am
Google too (it's been a while since college, and theat's the only time I've really known all the names of things). Of course by now, the top hit on...
November 14, 2011 at 2:45 am
Paul - that's exactly what I did when BOL didn't quite give enough information to answer.
I agree with your view on the 2 point question; sorry for doubting you.
(In real...
August 24, 2011 at 3:45 am
There would have been less guesswork involved if the full error message had been given instead of just an extract:
Query processor could not produce a query plan because of the...
August 24, 2011 at 2:49 am
You don't even need the WHERE clause. I've just done an SSIS step where I needed a single row returned, but didn't care about the contents, so I used
SELECT...
June 23, 2011 at 3:17 am
If you don't think you have, the easiest way to check is to check the "Scan for Startup Procs" configuration setting. If this is False, then you don't have...
April 18, 2011 at 2:17 am
Are you doing the restore from SSMS rather than a query? When SSMS opens its restore window, it starts a session using your default database. If this is...
April 5, 2011 at 2:16 am
Nakul Vachhrajani (2/15/2011)
I had to refer BOL for this one because we don't use Bulk-logged mode.
Sadly, my BOL diving didn't go deep enough. I got to here: http://msdn.microsoft.com/en-us/library/ms189275(SQL.100).aspx, which...
February 16, 2011 at 1:46 am
Koen (da-zero) (2/1/2011)
A bit easy though, as you can guess the answer just by looking at the names of the DMV. 🙂
I'm obviously too suspicious. I thought of that,...
February 1, 2011 at 1:57 am
I'm confused as to why you would consider '1753' to be an invalid date (assuming we're using the Julian calendar).
Datetime datatype runs from 1st January 1753, and the implicit and...
January 28, 2011 at 2:57 am
You don't really avoid using cursors or loops - if you have a look inside sp_msforeachtable and sp_msforeach_worker, you'll see it uses them itself.
For me, the main reason for using...
December 14, 2010 at 2:27 am
If you don't mind using undocumented procedures, you can simplify it slightly by replacing all the loop stuff with:
exec sp_msforeachtable @command1='insert #TempTable exec sp_spaceused ''?'''
I also convert the "KB" values...
December 14, 2010 at 1:54 am
Are you sure you need an SSIS package?
Could you use something like this in T-SQL (the variable's not strictly necessary, just makes it easier to change):
DECLARE @batchSize INT
SET @batchSize=25000
WHILE 1=1
BEGIN
DELETE...
December 3, 2010 at 5:13 am
I have no idea why I put inner joins in there. In my head they were lefts. 🙂
November 29, 2010 at 3:05 am
As a starter, here's one way you could get the totals you want:
select a.conName, b.bTotal, c.cTotal
from #tableA a
inner join (select conID, SUM(Total) as bTotal from #tableB group by conID) b
on...
November 26, 2010 at 6:00 am
Viewing 15 posts - 61 through 75 (of 131 total)