Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3229

Re: Remove double date rows in assortment table

$
0
0

Hi Michel,

 

1)  I  have one doubt, by using loop,we get the distinct value record ? or we have to use delete statement after SORT? Is line_zassortment table use necessary?

 

How it will store only the first row entry(latest date) and delete the old entries from the below statement ?

 

loop at zassortment2.

  line_zassortment = zassortment2.

  at new product.

    zassortment3 = line_zassortment.

    append zassortment3.

  endat.

endloop.

 

 

 

2) Suppose below will be CASE: If the start date to is different:-

 

Location     Product        Store date from    Store date to

 

12345          98331             20.10.2012              31. 02. 2014      

 

12345          98331             21.03.2015              31.12.2020  (Here 21.03.2015 not lie between 20.10.2012 - 31. 02. 2014.So no overlapping)

   

 

12345          98555             20.10.2012              31.04.2015    

 

12345          98555             20.05.2016              30.12.2020    




Then the result will be same for this as there no overlapping dates.


Location     Product        Store date from    Store date to

 

12345          98331             20.10.2012              31. 02. 2014      

 

12345          98331             21.03.2015              31.12.2020      


 

12345          98555             20.10.2012              31.04.2015    

 

12345          98555             20.05.2016              30.12.2020   


As there is no overlapping in the date interval of (2nd row with 1st row) . Similarly (3rd row with 4th row).So the entries will not be deleted.


So i need the logic for whether the date is overlap or not  for both the CASES ?


Is your code possible for this case?


Kindly help for this.

 

 

 

 

 

 

Regards

Priyabrat


Viewing all articles
Browse latest Browse all 3229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>