Hi All,
Thanks to sepnd few munites of your valuable time.
I am developing Sales Price Report based on Sales Price Table(Customized) and Item table.
I have created temp table to get data from both of the above tables based on the filters by users.
Filters: Profit centre, StartDate, EndDate
Now, the problem is Item has validity from StartingDate to EndingDate.
I need to get all the item valid with in the [StartDate, EndDate] (not StartingDate to EndingDate).
Ex:
Item StartingDate EndingDate
Item1 010110 311210
if user selected StartDate:011010 EndDate:311010 then Item1 is Valid and need to display.(because in range 010110 311210)
if user selected StartDate:011109 EndDate:311010 then Item1 is Valid and shouldn't display.(because out of range)
How to do this? ](*,)
Any ideas would be greatly
Pleasure in the job puts perfection in the work
0
Comments
IF UserStartDate < TableStartDate THEN
SKIP
Same thing with the End Date, but it is greater than instead of less than.
If it passes both of those conditions then you know the start date is between the two dates and so it the end date.
My Blog - nav.education