Viewing 15 posts - 106 through 120 (of 3,956 total)
LOL! A 5 year old thread?
Well, since you brought it up, this is how I do it.
April 21, 2015 at 6:38 pm
Alternate approach:
CREATE TABLE #table_Data(
[idx] [int] IDENTITY(1,1) NOT NULL,
[crtDte] [datetime] NOT NULL
) ON [PRIMARY];
DECLARE @StartDT DATETIME = GETDATE();
INSERT INTO #table_Data
VALUES (@StartDT-3),(@StartDT-1)
,(DATEADD(minute, -10, @StartDT))
,(DATEADD(minute,...
April 21, 2015 at 6:33 pm
WITH Alphas AS
(
SELECT a
FROM (VALUES('A'),('B'),('C'),('D')) a (a) -- use 22 letters
),
Numbers AS
(
SELECT n
...
April 21, 2015 at 6:17 pm
Recursion is not needed here if this is really being done in SQL 2012.
SELECT MACHINE_NUMBER, VALUE, EVENT_DATE
FROM
(
...
April 21, 2015 at 6:04 pm
Wayne West (4/21/2015)
April 21, 2015 at 5:27 pm
There is a Definition of the Microsoft Excel method for its PERCENTILE function on the linked Wiki page.
This implements that definition (not checked for all cases) and seems to return...
April 21, 2015 at 3:56 am
akash_singh (4/21/2015)
I am working on sql server 2008, can anyone help me with the logic please 🙂
I was afraid you were going to say that.
One of the issues I encountered...
April 21, 2015 at 2:20 am
Sean Grebey (4/20/2015)
dwain.c (4/20/2015)
With regards to your thread's subject:The only stupid query questions are the ones you don't ask.
Lol I feel like it was an easy question but I'm also...
April 20, 2015 at 9:01 pm
Jeff Moden (4/20/2015)
dwain.c (4/20/2015)
Jeff Moden (4/20/2015)
L30 (4/15/2015)
If so I found this on StackOverflow
April 20, 2015 at 7:24 pm
Jeff Moden (4/20/2015)
L30 (4/15/2015)
Ah... apologies asene, I should have read it more thoroughly. So you want to query a nested group?If so I found this on StackOverflow
http://stackoverflow.com/questions/13914698/query-ad-group-membership-recursively-through-sql
Thanks for...
April 20, 2015 at 7:03 pm
Too bad you're not in SQL 2012. It is not often that Itzik Ben-Gan writes an article with a name so close to your thread's title.
April 20, 2015 at 6:56 pm
In SQL 2012 there is a function PERCENTILE_CONT that will do this for you.
At PERCENTILE_CONT(0.5) this is the median. Which can be calculated like this:
April 20, 2015 at 6:50 pm
You were 90% of the way there:
CREATE PROCEDURE YourProcName
(
--DECLARE
@dtstart_time DATETIME ,
@dtend_time DATETIME
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @parts TABLE
...
April 20, 2015 at 6:34 pm
I'm agreeing with twin.devil here. Just make filename a column in one permanent table.
April 20, 2015 at 6:30 pm
With regards to your thread's subject:
The only stupid query questions are the ones you don't ask.
April 20, 2015 at 6:23 pm
Viewing 15 posts - 106 through 120 (of 3,956 total)