Reputation
Next tag badge:
614/400 score
67/80 answers
Badges
11 133 248
Newest
 Nice Answer
Impact
~3.6m people reached

4h
comment How to map a drive in a SQL Server script
Why are you doing this in SQL Server?
4h
comment Enforce a single NULL end date per foreign key value using an index
@nytrex The filtered index definition will be left out if your script settings say to target SQL Server 2005 (this tricked me before too). There is also a bug that has been fixed and you may be affected. What is SELECT @@VERSION; output, and what is the build # in SSMS' Help > About?
6h
awarded  Nice Answer
1d
comment Why would SQL Server remain unresponsive after a slow query completes?
Could simply be that your function pulled enough data into the buffer pool to evict everything else. Subsequent queries would be slow as they have to wait for SQL Server to read that data back from the disk into memory.
1d
comment Unique clustered index on indexed view fails because of aggregates
You're going to have to materialize the results of the function elsewhere, I suspect.
1d
comment One SQL different Results by using SQLOLEDB or MSDASQL
Dan, can you explain why the SET would send DONE_IN_PROC messages to the client? I never knew that would happen for simple variable assignments (though I do understand it resets @@ROWCOUNT, like all statements do).
1d
revised Retrieve result for all the users
added 446 characters in body
1d
comment Retrieve result for all the users
@user74234 Ok, concept is still the same
1d
revised Retrieve result for all the users
added 81 characters in body
1d
comment Retrieve result for all the users
@James no, then it would just be a single sum for all team members; presumably, they want a row per team member, showing each team member's hours.
1d
comment List of role permissions including other roles - how can I find out the roles that belong to other roles?
You would need to use recursion because you can always add a role to another role - it's a never-ending rabbit-hole.
1d
answered Retrieve result for all the users
1d
answered select where column with a %
1d
comment Upgrade Database from SQL Server 2008 to SQL Server 2008 R2
(You need to read the error message and/or output of SELECT @@VERSION; or even the version number in Object Explorer a little more carefully.)
1d
comment SELECT COUNT(*) to html table
Why do your notifications need to be in HTML? I get plain text e-mails all the time. I can still read them. And they're a lot easier to generate from Database Mail than this maintenance nightmare you're attempting.
1d
revised SELECT COUNT(*) to html table
edited tags
1d
comment SELECT COUNT(*) to html table
I'm very confused about what you're trying to do, you say you want counts but then the HTML and the XML have column_name in them. Can you show a sample of the actual HTML output you're trying to get, fully explain what any "count" represents (is it number of columns in the table, number of rows in the table, number of rows where that columns is not null, or some other interpretation?), and can you explain why the SQL Server Agent job is the one who should be responsible for generating HTML?
1d
answered Is there a way to run this query in all databases ? ( SQL Server 2008 R2 )
1d
revised Find data size of table for several identical databases on a instance
Updated to account for older versions of SQL Server that won't output 3-part names from sp_spaceused
1d
comment Identity column in columnstore index
Welcome Niko!!!