Viewing 15 posts - 2,446 through 2,460 (of 5,394 total)
Lowell (10/13/2011)
you guys completely forgot that you can use a check constraint that uses a user defined function...
No, I'm not forgetting, I'm deliberately avoiding that. 😛
From a performance standpoint, it...
October 13, 2011 at 7:30 am
vick12 (10/13/2011)
what is teh difference between 108 and 109.
Style 109 is 'mon dd yyyy hh:mi:ss:mmmAM', for instance 'Oct 13 2011 2:57:12:350PM'.
AS you can see, this format cannot be sorted...
October 13, 2011 at 6:58 am
Darn! I guess you're out of luck.
I tried in many ways, but I think that this particular requirement can't be implemented with an indexed view.
Some restrictions apply, and one of...
October 13, 2011 at 6:55 am
Lynn Pettis (10/13/2011)
vick12 (10/12/2011)
SELECT starttime, convert(varchar(20), starttime,102)+convert(varchar(20), starttime,108) FROM testdate ORDER BY convert(varchar(20), starttime,102)+convert(varchar(20), starttime,108)
I don't see a distinct in the original query.
Sorting on starttime will give the same results...
October 13, 2011 at 6:45 am
Richard Warr (10/13/2011)
SELECT VulnID, Host, SCANCOMPLETETIME FROM (
SELECT VulnID, Host, SCANCOMPLETETIME,
ROW_NUMBER() OVER (PARTITION BY Host, VulnID ORDER BY SCANCOMPLETETIME DESC) rw FROM...
October 13, 2011 at 5:59 am
Prepare a list of disabled users and add it to this code.
USE master;
GO
DECLARE @DisabledUsers TABLE (
LoginName nvarchar(128)
)
INSERT INTO @DisabledUsers VALUES ('Tom')
INSERT INTO @DisabledUsers VALUES ('[MyDomain\Harry]')
INSERT...
October 13, 2011 at 4:28 am
October 13, 2011 at 3:49 am
Phil Parkin (10/13/2011)
I suspect (just a wild guess) that the query contains DISTINCT in the select list and, since the OP is selecting the converted date, can only ORDER BY...
October 13, 2011 at 3:36 am
I'm afraid I ended up overcomplicating the original problem.
Anyway, here's my solution:
-- SETUP: Create master table (sentences)
DECLARE @ThisTable TABLE (
id int
)
-- Create detail table (sentences broken in rows, Latin, English,...
October 13, 2011 at 3:31 am
Lynn Pettis (10/12/2011)
What is wrong with just using ORDER BY starttime?
I suspect (just a wild guess) that the query contains DISTINCT in the select list and, since the OP is...
October 13, 2011 at 2:10 am
You just need to reference the main query in the subquery. Something like this:
DECLARE @VULNS_VIEW TABLE (
VulnID int,
HOST varchar(10),
SCANCOMPLETETIME datetime
)
INSERT INTO @VULNS_VIEW
...
October 13, 2011 at 2:03 am
Is your SSMS patched to the latest service pack?
I've seen some bugs in the RTM version regarding SQL Agent Jobs.
October 13, 2011 at 1:54 am
Lynn Pettis (10/12/2011)
October 12, 2011 at 4:23 pm
jcrawf02 (10/12/2011)
While that's funny, I can't imagine why anyone would ever want to do that. This is the coolest thing I've ever heard.
I'm scared to death whenever I fly with...
October 12, 2011 at 3:23 pm
Viewing 15 posts - 2,446 through 2,460 (of 5,394 total)