This discussion is archived
2 Replies Latest reply: Aug 29, 2013 5:57 AM by MaheshSinha RSS

Help Required to get Age of an Item at fix day of every week

MaheshSinha Newbie
Currently Being Moderated

Hi Friends suppose i am having following table structure

INVSTOCKEntcode
ItemCode
Entdt
Enttype
Qty
Rate
InvitemItemCode
Group Name
Item Name

 

Where invitem.itemcode =invstock.itemcode

 

Now i want to create a report based on user input of month. (If i have given month as Aug)

It  has to show me Closing Stock as in following format

               0-30 Days                                                                 31-60 Days                                                            > 60Days

               W1_Qty, W2_Qty, W3_Qty, W4_Qty                    W1_Qty, W2_Qty, W3_Qty, W4_Qty                         W1_Qty, W2_Qty, W3_Qty, W4_Qty

Division

 

Where

W1_qty : Quantity of Division as on first Monday

W2_qty : Quantity of Division as on Second Monday

 

Calculation Used to get Weekday : TO_NUMBER(TO_DATE (next_day(trunc(sysdate, 'MONTH')-1, 'Monday')+21)

 

Thanks in advance

Mahesh Sinha

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points