Viewing 15 posts - 6,451 through 6,465 (of 7,608 total)
INSERT INTO #tempTable
EXEC dbo.someStoredProc
August 20, 2013 at 8:53 am
Here's one way:
SELECT
DATEADD(MONTH, DATEDIFF(MONTH, 0, c.month), 0) AS Month,
SUM(c.sales) AS Month_Sales
INTO #Monthly_Totals
FROM dbo.Car c
WHERE
c.month >= '20120401' AND --chg...
August 20, 2013 at 8:34 am
What are the results of this query:
SELECT
cpu_count / hyperthread_ratio AS CPUs, *
FROM sys.dm_os_sys_info
August 19, 2013 at 2:45 pm
Data compression should also be considered, if on Enterprise Edition. [My company has some extremely large audit/logging tables that are rarely read. After compressing them, I often shrink...
August 19, 2013 at 11:35 am
Sometimes a database file shrink is indeed needed.
Shrink does not automatically fragment every index. Absolutely you should test for fragmentation after the shrink, and rebuild accordingly, i.e., basically run...
August 19, 2013 at 11:28 am
You should also consider putting the quarter as the first key column of the clustered index. Then you won't need to partition in any way as long as you...
August 16, 2013 at 3:19 pm
Change Tracking or Change Data Capture also might be useful, depending on your specific requirements.
August 16, 2013 at 3:13 pm
In the context of a LEFT JOIN, yes, the queries would return the same rows from TableA (although, as noted, they might appear multiple times because of the join).
That is,...
August 16, 2013 at 3:11 pm
You shouldn't have any direct issues from doing that.
First, drop the existing nonclus index, then create the clus index.
Build the index ONLINE if at all possible, to minimize disruption to...
August 16, 2013 at 2:56 pm
Instead of constantly disabling/enabling the trigger, you can set RECURSIVE_TRIGGERS off for the db, unless you really need recursion for other triggers. In that case, you can use CONTEXT_INFO...
August 16, 2013 at 2:53 pm
I think DISABLE is far more dangerous, since it applies to every task modifying the table.
Instead you can use CONTEXT_INFO to selectively exit the trigger / skip all/part of the...
August 14, 2013 at 1:07 pm
The code uses LIKE to compare the string, so just construct your string accordingly.
For example, you could use 'ls-' as the search string. Or, if you want a closer...
August 14, 2013 at 12:56 pm
EXEC Stored_procedure1 ('abc')
EXEC Stored_procedure1 ('123')
EXEC Stored_procedure1 ('abc112')
Yes. The core of the logic is this:
CASE WHEN <string_value> LIKE '%[^0-9]%' THEN <string> ELSE <int> END
For example:
SELECT
data,
...
August 14, 2013 at 11:36 am
cdl_9009 (8/14/2013)
We have the trigger in place...
August 14, 2013 at 11:33 am
Assuming the account running "JobA" has the authority to start jobB, the command in JobA would be:
EXEC msdb.dbo.sp_start_job 'JobB'
August 13, 2013 at 3:18 pm
Viewing 15 posts - 6,451 through 6,465 (of 7,608 total)