Viewing 13 posts - 1 through 13 (of 13 total)
So, just to be sure, "Component N" and "Region" can actually be anything, correct? And the goal is to assign the "N" of "Group N"? Do the requirements of...
May 30, 2022 at 1:36 pm
Let me give more context on this. I am trying to identify if multiple components have been purchased by customers (Sales>0) in Last 4 quarters and then on...
May 30, 2022 at 7:06 am
Let me give more context on this. I am trying to identify if multiple components have been purchased by customers (Sales>0) in Last 4 quarters and then on basis of...
May 28, 2022 at 4:01 am
I am getting the same output with this query
Select convert(date,saledate),sum(saleprice) from Data.SalesbyCountry
where convert(date,saledate) = eomonth(saledate) and year(saledate)='2016'
group by convert(date,saledate)
Am I missing something...
August 20, 2018 at 3:39 am
Well, you need to be changing your PromotionRowID logic as well, Other wise your whouldn't be having the same result. Let say you have another ChargeCode 'SLA' which comes under...
August 16, 2016 at 12:10 pm
The Select statement in the APPLY clause doesn't include a FROM clause because it's referencing a column from previous tables (in this case DtlChrg) and making computations on the columns...
August 15, 2016 at 2:29 pm
Hi Twin Devil,
I have already completed these stairways and apply operator basics. Now I'm focusing on practical part and I know the best way to learn is solve problems that...
August 15, 2016 at 9:36 am
User7766 (8/10/2016)
twin.devil (8/10/2016)
SELECT
PromotionInd
, ISNULL(MAX(case when vChargeCode = 'BRK' then vChargeCode end),0) AS BrkChargeCode
, ISNULL(SUM(case when vChargeCode = 'BRK' then [ChrgAmt] end),0) AS BrkAmount
, ISNULL(MAX(case when vChargeCode = 'CLR'...
August 13, 2016 at 11:26 am
Try this:
Select
t2.ID1,
t2.startdate as taskstartdate,
case
when t2.enddate < getdate() then max(t1.Cumulative)
when t2.StartDate > getdate() then 0
when getdate() < t2.enddate and getdate() > t2.StartDate
then (Select max(t3.Cumulative) from #Table1 as t3...
August 8, 2016 at 6:43 am
Try this for table1 and table2 :
Select
t2.ID1,
t2.startdate as taskstartdate,
case
when t2.enddate < getdate() then max(t1.Cumulative)
when t2.StartDate > getdate() then 0
when getdate() < t2.enddate and getdate() > t2.StartDate
then (Select...
August 8, 2016 at 2:58 am
Viewing 13 posts - 1 through 13 (of 13 total)