Viewing 15 posts - 5,506 through 5,520 (of 8,416 total)
nigel. (3/11/2010)
They could come in really handy. Oh, if only I had 2008, 😀 and the time to play.
2008 Dev Edition $50ish.
Free time...priceless :laugh:
March 11, 2010 at 8:48 am
medelstein (3/11/2010)
CROSS APPLY sys.dm_exec_sql_text(er.sql_handle) as qt
with this error:
Msg 102, Level 15, State...
March 11, 2010 at 8:46 am
Try dbid on sys.sysprocesses - that's not a DMV/DMF but I can't remember the funky new equivalent for the moment...
March 11, 2010 at 8:37 am
Good point Jeff. My approach though, is to always try to provide code if I have time. My thinking is that although my script might be copy-and-pasted, anyone...
March 11, 2010 at 7:01 am
GDI Lord (3/11/2010)
Which DMVs can I use that I can join with sys.dm_exec_connections abnd sys.dm_exec_sessions so that I can get a database name/id?
Database context only makes sense for a currently-executing...
March 11, 2010 at 6:54 am
GDI Lord (3/11/2010)
As an aside, is there a highlevel overview of the DMVs that you could recommend?
Second question first:
March 11, 2010 at 6:51 am
Just noticed this is the 2005 forum. So, here's a 2005-compatible version of my code:
DECLARE @Sample
TABLE (
account ...
March 11, 2010 at 6:48 am
I will check, you know...;-) 😛 :w00t:
March 11, 2010 at 6:27 am
Sigh. And here is the corrected version of the sample-data-generation script.
This one doesn't try to set identity_insert for a table with no identity column, and also has the decided...
March 11, 2010 at 6:24 am
WardyWonderland (3/11/2010)
So If I have Account=1, Date = 01/03/2010, Date2 = 02/03/2010 and Date3 = 03/03/2010 what would be the most elegant way to return 01/03/2010?
Maybe:
DECLARE @Sample
TABLE ...
March 11, 2010 at 6:17 am
stewartc-708166 (3/11/2010)
If the OrderDate column were of type DATETIME, try:
WHERE dbo.[Order].OrderDate BETWEEN CAST(FLOOR(CAST(GETDATE() AS FLOAT)) AS DATETIME) AND CAST(FLOOR(CAST(GETDATE() AS FLOAT)) AS DATETIME) + 1
SARGable maybe...but definitely undocumented and unsupported.
Even...
March 11, 2010 at 6:04 am
March 11, 2010 at 5:55 am
You should not rely on it. Use the dynamic management views instead, for example:
Paul
March 11, 2010 at 5:52 am
To illustrate Rob's point:
DECLARE @Sample
TABLE (
raw_data INTEGER NOT NULL,
...
March 11, 2010 at 5:49 am
Viewing 15 posts - 5,506 through 5,520 (of 8,416 total)