Viewing 15 posts - 16 through 30 (of 284 total)
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 20, 2018 at 11:18 am
cwatson 81945 - Monday, March 19, 2018 1:53 PMBut there will be duplicate SQL and I was trying to avoid that.
You can modify...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 19, 2018 at 3:02 pm
I'm not sure of what you want you output to be. Did you want 1 query that returned all the different craft_groups and also what is <> to 'OTHER'? Or...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 19, 2018 at 1:37 pm
This is the first thing off the top of my head. I'm sure a variation of this will get the output you are looking for. For future posts, please...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 16, 2018 at 6:59 am
;with cte as
(
Select C_SSKey, MAX(DS_SysEnd) MaxDate
from #PriorMonth
group by C_SSKey
)
select c.* , cte.MaxDate
from #CurrentMonth C
inner join cte on cte.C_SSKey =...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 5, 2018 at 9:21 am
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 29, 2018 at 1:21 pm
Solution #2 Does not work with a larger dataset. Still returns one row.
What's...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 25, 2018 at 1:03 pm
Here are 2 simplistic ways to return the 3rd (last) row. I'm betting there is something more complicated where this would be used, but this is a starting point! __________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 24, 2018 at 4:02 pm
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 26, 2017 at 6:03 am
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
November 30, 2017 at 8:41 am
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
August 16, 2017 at 10:55 am
I have updated the original post with DDL for #TRValue with 3 rows.
After it is all said and done, I would like to have the LR01 CurrentMarket be...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
August 15, 2017 at 5:10 pm
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 17, 2017 at 10:01 am
This is similar to a problem I had last week. The TOP 1 option was the answer when looking for a "sliding" result.
Don't know if this fulfills your...
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 13, 2017 at 8:02 am
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 27, 2017 at 8:36 am
Viewing 15 posts - 16 through 30 (of 284 total)