Viewing 15 posts - 946 through 960 (of 3,957 total)
PSB (1/7/2014)
OpenticketsTillDate works perfectly . Below is what I need for ClosedTicketsTillDate .
For Grp A , where create DAte...
January 7, 2014 at 6:46 pm
Jeff Moden (1/7/2014)
paul.goldstraw (1/7/2014)
January 7, 2014 at 4:56 pm
Jeff Moden (1/6/2014)
dwain.c (1/6/2014)
January 7, 2014 at 2:58 am
Jeff Moden (1/6/2014)
[EDIT]... hmmm... although.... it might just be a RANK problem, now that I think about it a bit more.
OK. You've got my attention. I've see DENSE_RANK...
January 6, 2014 at 11:48 pm
Jeff Moden (1/6/2014)
Other than that, this is a LEAD/LAG problem and that does require SQL Server 2012... which I don't have installed anywhere, yet.
Actually, COUNT over a window frame is...
January 6, 2014 at 11:25 pm
I agree that I don't think the OP's input data matches the stated, expected results. However I do believe what he's looking for would be something like this:
SELECT [GROUP],...
January 6, 2014 at 11:22 pm
debajit (1/4/2014)
Please find sample data.
File_List
File_ID File_Status Customer_NameDirectionFirst_DirectoryOriginal_FileName
1 Active P&G ...
January 5, 2014 at 6:57 pm
SQL and Soda (1/3/2014)
I don't think you can make ON clauses conditional.
Correction. It is possible to have conditional ON clauses using CASE. However, in this case I don't...
January 5, 2014 at 6:50 pm
I would never attempt to produce a faster solution than ChrisM@Work because I know I can't, unless of course I get a little help from Itzik Ben-Gan.
-- Method by Itzik...
January 5, 2014 at 6:28 pm
Ultimately, I believe you will need to aggregate twice. Once on User ID and once on company. So here's an alternate approach.
SELECT a.[User ID], [Group ID], Company
FROM
(
...
January 5, 2014 at 5:52 pm
Jeff Moden (1/3/2014)
Ok... that tears it. :blush: I have to get off my dead hinny and install 2K12. Thanks to folks like you, Wayne Sheffield, and a couple...
January 5, 2014 at 5:29 pm
Lynn Pettis (1/4/2014)
Okay, I was just curious as it is a pet peeve of mine. The semicolon is a statement terminator not a statement begininator.
I confess to being one...
January 4, 2014 at 8:47 pm
Thanks yet again for an insightful article (probably one of the few of your I hadn't read prior). Indeed, a crack was filled.
I was curious what the SQL 2012...
January 2, 2014 at 9:32 pm
pietlinden (1/2/2014)
But what if it's a Babelfish and I need it to speak T-SQL?
You can use:
EXEC sp_translate @SourceLanguage='gibberish', @TargetLanguage='T-SQL'
January 2, 2014 at 8:28 pm
I'm not sure if this is exactly what you want but you might want to look at it and see if it gives you some ideas.
WITH SampleData (ID, SDT, EDT)...
January 2, 2014 at 6:57 pm
Viewing 15 posts - 946 through 960 (of 3,957 total)