Viewing 15 posts - 5,356 through 5,370 (of 7,597 total)
Trim functions deal only with spaces. The easiest way to take care of all whitespace is to use REPLACEs, something like this:
LEFT OUTER JOIN LedgerGroups lg ON
...
February 12, 2015 at 9:08 am
Verify that the db does not have autoclose or autoshrink set to on.
February 11, 2015 at 12:09 pm
I'd shrink the log file:
DBCC SHRINKFILE ( 2, 4096 )
February 10, 2015 at 4:20 pm
Rick Todd (2/10/2015)
Nevyn (2/10/2015)
February 10, 2015 at 3:02 pm
Also, verify that you have enough free log space on that db already allocated to handle all the deletes.
February 10, 2015 at 2:22 pm
Make sure you have nonclustered indexes on:
transaction_hdr ( float_no )
transaction_tenders ( float_no )
You want SQL to scan the floats table, not use an index, since it will delete > 70%...
February 10, 2015 at 2:21 pm
You might want to consider putting each client schema in a different db, then using synonyms in the main db to point to those objects. It will look to...
February 10, 2015 at 11:01 am
;WITH cteCustRecentOrders AS (
SELECT
AA.[CustomerCode],
AA.[OrderDate],
AA.CustomerProductID,
AA.Rank_ID
FROM (
...
February 9, 2015 at 12:40 pm
Luis Cazares (2/6/2015)
Scott,I mainly agree with you, but the OP stated that there's always one Payroll_Year at a time. Based on that, I wouldn't include it in the index.
True, I...
February 6, 2015 at 12:38 pm
jdbrown239 (2/6/2015)
I have 15 GB allocated space and 98% free
In the log file?
Yeah, that should be plenty, so the statement should run as fast it can.
Are there triggers, replication or...
February 6, 2015 at 10:28 am
I'd cluster the table by:
Payroll_Year, PayPeriod, EmployeeID and, optionally, CompanyID
That way the clustering key is generally increasing, which will reduce fragmentation. That's not the main criterion for a clus...
February 6, 2015 at 9:32 am
That statement is going to have the scan the table regardless of what you do.
The critical thing for performance is to pre-allocate (and thus pre-format) enough log space for the...
February 6, 2015 at 9:23 am
Yes. Why risk not recompiling it?
Get the query plan id and remove all plans related to this proc from the cache using:
DBCC FREEPROCCACHE { plan_handle }
February 5, 2015 at 2:23 pm
JJR333 (2/5/2015)
The first NOT clause makes all the difference.
Is this T-SQL logic different from say Excel VBA logic?
SUM the turnover of all stores NOT...
February 5, 2015 at 1:07 pm
You can put the SELECTs directly in the ISNULL, you don't have to use separate queries:
SELECT ISNULL((select H from table_1 where a = 'X' and b = 'Y'),
...
February 5, 2015 at 1:02 pm
Viewing 15 posts - 5,356 through 5,370 (of 7,597 total)