Viewing 15 posts - 7,336 through 7,350 (of 8,416 total)
Scott Coleman (8/7/2009)
Using DENSE_RANK instead works better, but there still may be degenerate cases.
As it happens, originally I did use DENSE_RANK, but changed it on a whim as I posted.
DENSE_RANK...
August 7, 2009 at 9:23 am
SELECT Name = A.value('name[1]', 'varchar(50)'),
Value = A.value('value[1]', 'varchar(50)'),
LON = A.value('parent::document/parent::orderrequest/loannumber[1]', 'int')
FROM...
August 7, 2009 at 8:25 am
You could hack at it with CASE, but fundamentally the approach is flawed.
If you store key-value pairs in rows instead of columns, you will find the task trivial.
Paul
August 7, 2009 at 8:05 am
Matt Wilhoite (8/7/2009)
Thats nice. I never even thought to do a mod on the rank() function.
Thank you Matt :w00t:
August 7, 2009 at 8:03 am
Grant Fritchey (8/7/2009)
OK, how about "all the databases you should be messing around with" can be accessed through sys.databases? :hehe:
:laugh: better :laugh:
August 7, 2009 at 8:00 am
Even that won't show all the databases on a server.
You need to run:
SELECT * FROM master.sys.sysdbreg;
from the DAC to see the hidden mssqlsystemresource database. 😉
Paul
August 7, 2009 at 7:38 am
Not guaranteed to split equally, but groups nicely:
select FireCentreName, ProjectID, DisplayName, RANK() OVER(ORDER BY FireCentreName) % 2 + 1 AS 'ColumnNumber'
from FireList
order by ColumnNumber, FireCentreName -- Not required, just...
August 7, 2009 at 7:30 am
rod.means (8/7/2009)
The index that I am testing with is only 63 KB.
That will just fit in the first (mixed) extent. My previous comments apply to indexes as well as...
August 7, 2009 at 7:10 am
Bob Hovious (8/5/2009)
August 7, 2009 at 6:56 am
Hey David,
On a large-ish table like this, even for a relatively modest change such as you describe, I would be very tempted to bulk copy the data out (ordered by...
August 7, 2009 at 6:24 am
I'm tempted to say: "it depends"; however I am going to say that it is pretty much essential to have tempdb on its own data path and with dedicated drives...
August 7, 2009 at 5:39 am
TheSQLGuru (8/7/2009)
And if you take the problem to Microsoft, that is the first thing they will check on - are you on the latest service pack.
Good point!
Though actually the first...
August 7, 2009 at 5:28 am
I would just add that a nonclustered index that INCLUDEs every non-key column in the object is pretty close to being another clustered index. This can be an optimization...
August 7, 2009 at 5:16 am
With AWE in use on x86:
Performance Monitor Counters:
SQL Server: Buffer Manager: Total pages (multiply by 8KB) = data cache size
Process: sqlsrvr: PrivateBytes = other memory allocations, including mutli-page allocations ("MemToLeave")
So...
August 7, 2009 at 5:05 am
It would also help if you would post the output from:
SELECT * FROM sys.configurations;
...and...
The current SQL Server error log
...and...
DBCC MEMORYUSAGE;
The output from the second and last ones will be large,...
August 7, 2009 at 4:56 am
Viewing 15 posts - 7,336 through 7,350 (of 8,416 total)