Viewing 15 posts - 1 through 15 (of 21 total)
OK, that was easier than I was making it. Thank you Drew, I used your solution.
-martin
February 13, 2019 at 11:18 am
Thank you sir, your explanation made me understand it perfectly. I added one more join for a 10K limit which should be enough.
-martin
March 26, 2018 at 10:47 am
Thanks everybody!
I ended up using the response by Mr. Jacob Wilkins.
There is something I'm not understanding though: The cte that is called 'n', why is it just a...
March 26, 2018 at 10:01 am
I apologize for the sheistiness... I did indeed edit the OP because I had a couple of the values incorrect. The [interval_prime field] should indicate the first interval of the...
August 19, 2015 at 4:29 pm
thank you, that's pretty clever. I was close, but probably would not have gotten the answer on my own. and I'm actually working in oracle on this specific query, but...
July 30, 2015 at 12:38 pm
Thank you very much for your efforts, I learned a new thing today.
I'm still trying to wrap my head around the join that you did. Very clever...
Now it will...
August 12, 2014 at 12:48 pm
Hi Steve, thanks for your response.
This is totally a work problem, the example I provided is a very simplified version of our actual data. To give you the background: I...
August 12, 2014 at 12:09 pm
Steve, one more question. I'm able to use your last solution, but how can I turn the NULLs into Zeros? I tried a few things that didn't work.
May 29, 2014 at 2:26 pm
Thanks for your interest Steve. The reason I changed date to datetime is because I'm actually using SSMS 2005 (sorry I posted in the 2008 section for increased readership).
how can...
May 29, 2014 at 1:28 pm
Luis,
Thanks for your help.
Changing the datatype to (max) in both places helped. Now I get the correct crosstab columns and rows, but the data part is completely blank.
I had to...
May 29, 2014 at 1:18 pm
Steve,
I tried your code. I had to change it slightly, so I changed the query to:
DECLARE @sql AS varchar(max), @DATES AS varchar(max)
set @sql = ''
set...
May 29, 2014 at 1:14 pm
Luis, thank you very much, I was able to adapt your query to fit my needs!
The only issue now is that the 4000 limit ends up cutting off the...
May 29, 2014 at 12:18 pm
thanks for the replies.
erin,
the reason i need to avoid th pivot function is because i'm using an older version that doesn't have it.
howard,
the name of the columns should be the...
March 26, 2013 at 11:31 am
i got it guys, the answer for those searching later is:
and
(
[FIELD] = case
when @var = A then A
when @var = B then B
when @var = C then C
when...
June 26, 2012 at 12:20 pm
i wish i had a fraction of your intellect...
thanks for taking the time to answer my question, i learned a new thing today!
-mm
April 6, 2012 at 2:04 pm
Viewing 15 posts - 1 through 15 (of 21 total)