Viewing 15 posts - 1 through 15 (of 58 total)
it is hard coded solution ... the values can be vary
April 24, 2023 at 11:27 pm
June 13, 2022 at 3:53 pm
Hi Expert,
i want insert statement from table into file , this will consider as backup
Expected output
insert into table2
values('2022-02-02',22)
,('2022-02-03',22),
('2022-02-04',22)
June 13, 2022 at 3:46 pm
expecting below output
insert into table2
values('2022-02-02',22)
,('2022-02-03',22),
('2022-02-04',22)
June 13, 2022 at 3:11 pm
7 is expected because prodnumber=prod1000 comes with Minstartdate. whatsover value with minstartdate that should come and maxstartdate,4_5,4_2 will be calculated as below
here is the calculation for 4_5 and 4_2
calculate max...
May 20, 2022 at 3:25 pm
it would be 7 which means produnumber,min prodstartdate,prodid will remain same only maxprodstartdate and 4_5 and 4_2 value will change
see the output:
May 20, 2022 at 2:12 pm
Here is the image.. attached again to main question
May 19, 2022 at 4:31 pm
i tried
;with mycte as (
select newdate,status,value
,count(*) over(Partition by status,value) cnt
,row_number() Over(Partition by status Order by newdate) rnAsc
,row_number() Over(Partition by status Order by newdate DESC) rnDesc
from test
)
select newdate,status,value
from mycte
WHERE (cnt>1 and...
April 19, 2022 at 9:49 pm
Viewing 15 posts - 1 through 15 (of 58 total)