Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

generating the week numbers for 2019 and inserting in a table

twinklin_girlSep 9 2018 — edited Sep 10 2018

Hello ,

does anyone has a function/procedure to generate the week numbers (1-52) for year 2019 based on the dates and then to insert there in a table.

I need to insert my records in table FAP_CALWEEKS . Can anyone please help ?

E.g

For week1 in 2019

INSERT INTO CALWEEKS (CAW_ID ,CAW_STATUS      ,

  CAW_CREATEDBY    ,

  CAW_UPDATEDBY    ,

  CAW_DT_CREATED   ,

  CAW_DT_UPDATED   ,

  CAW_YWKNO ,

  CAW_YEAR ,

  CAW_WKNO  ,

  CAW_YMTH_PROD ,

  CAW_YMTH_PAYR ,

  CAW_FTNGT_PAYR  ,

  CAW_YEAR_FISCAL )

  VALUES

  (916,1,null,null,sysdate,sysdate,201901,2019,1,201901,201901,null,2019);

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2018
Added on Sep 9 2018
17 comments
792 views