Viewing 15 posts - 4,066 through 4,080 (of 7,610 total)
How many rows do you add in a day? Is the fragmentation really significant enough that you need to rebuild a table with 1.2B rows?
October 24, 2016 at 9:53 am
Who knows, maybe this?
select id, name,
max(value) as value
from table A
group by
id,
name
October 21, 2016 at 3:36 pm
Highlight the text, then press Ctrl-Shift-U. And, yes, Ctrl-Shift-L will convert everything selected to lower case :-).
Edit: That's in SSMS (just to be clear).
October 21, 2016 at 3:16 pm
First off, switch to using BEGIN TRY ... END CATCH rather than just the error code. That will give you a lot more options and capabilities on your error...
October 21, 2016 at 12:26 pm
Look up the "READPAST" hint. I think it may help with what you are trying to do.
October 21, 2016 at 12:12 pm
For non-work days, I agree a table is best, and as I stated above, I have tables holding non-work dates (only). Such a table is naturally much smaller that...
October 21, 2016 at 10:42 am
Van Heghe Eddy:
Keep in mind that when SQL creates an index on a table, there are basically two types of pages in that index: upper-level (non-leaf) index pages and lowest-level...
October 21, 2016 at 8:26 am
Ronen Ariely (10/20/2016)ScottPletcher, the idea is not to save space in the backup, but in the the restored database.
Indeed, and that's exactly what I pointed out. Shrinking before...
October 21, 2016 at 8:07 am
A shrink will not save any (significant) space in the db backup, but it certainly can make the restore files smaller.
You could also consider restoring the db back to its...
October 20, 2016 at 11:18 am
Be aware too that if @DataSourceJobRevenue is NULL, then nothing will print, because
PRINT NULL
doesn't show any output.
October 19, 2016 at 12:52 pm
whenriksen (10/18/2016)
DATEADD(WEEK, ABS(( DATEDIFF(WEEK, '20161009', DATEADD(DAY, -1, o.modify_date))
+ 1 ) % 2), DATEADD(DAY, ( DATEPART(WEEKDAY, DATEADD(DAY, -1, o.modify_date))
- 7 )...
October 18, 2016 at 10:33 am
Fortunately SQL stores the last good DBCC date in the header data for the db.
Run this command:
DBCC DBINFO('<your_db_name>') WITH TABLERESULTS
And look for a "Field" value of "dbi_dbccLastKnownGood" (or similar): the...
October 18, 2016 at 9:57 am
The value for @DataSourceJobRevenue must be passed in as a parameter value when the proc is run. For example:
EXEC dbo.ImportJobRevenue 'JobRevenueValue'
It's a required parameter, so its value must be...
October 17, 2016 at 4:00 pm
It might be worth trying code below, as it seems to limit the number of "j" lookups required. A nested-loop join didn't prevent the extra lookups -- for whatever...
October 17, 2016 at 1:07 pm
whenriksen (10/17/2016)
ScottPletcher (10/17/2016)
October 17, 2016 at 9:40 am
Viewing 15 posts - 4,066 through 4,080 (of 7,610 total)