469,346 Members | 6,483 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,346 developers. It's quick & easy.

How to update column (ISO_WEEK) in TOAD Oracle?

Hi All,

Good day.

We have a job in BODI that is currently populating this current table and we want to update column (ISO_WEEK) in the attached file, I highlight the affected rows in yellow there are correct and the red are the one need to update in 2009W53-2010W53.

Here is my script that I use and it still missing something?

UPDATE AW_WAREHOUSE_TIME_DIM2
SET ISO_WEEK = ISO_YEAR||'WK53'
WHERE
ISO_WEEK_IN_YEAR = 52 AND
MONTH_OF_CALENDER_YEAR = 12 AND
DAY_OF_CALENDER_MONTH <= 31

Anyone inputs is highly appreciated.

Thanks,
Piery Lancer J. Buenvenida
Attached Files
File Type: zip yearend.zip (21.3 KB, 67 views)
Jan 11 '11 #1
3 4466
amitpatel66
2,367 Expert 2GB
Are you facing any issue? can you post the error that you are facing?
Jan 19 '11 #2
Currently the script that I using has no error rather it update all week52 to week53 and that is wrong.

The issue on our side is when year end arrives and BODI jobs failed due to calculation of ISO_WEEK is wrong.

I set an example the year 2009 it has an excess week52 (WK52 range Dec 20-26). Please see detail below:

CALENDAR_DATE ISO_WEEK

20/12/2009 2009W52
21/12/2009 2009W52
22/12/2009 2009W52
23/12/2009 2009W52
24/12/2009 2009W52
25/12/2009 2009W52
26/12/2009 2009W52
27/12/2009 2009W52
28/12/2009 2009W52
29/12/2009 2009W52
30/12/2009 2009W52
31/12/2009 2009W52

I wanted to do is everytime it has an excess week52 per year it will update ISO_WEEK to 20**W53
Jan 19 '11 #3
Here is my new script but still it encounter an error saying ORA-00933: SQL command not properly ended

UPDATE AW_WAREHOUSE_TIME_DIM2
SET ISO_WEEK = '2009WK53' FROM (select COUNT(ISO_WEEK_IN_YEAR) from AW_WAREHOUSE_TIME_DIM2
where
ISO_YEAR = '2009' AND
ISO_WEEK_IN_YEAR = '52'
WHERE
ISO_WEEK = 52 AND
MONTH_OF_CALENDER_YEAR = 12 AND
DAY_OF_CALENDER_MONTH <= 31 AND
COUND(ISO_WEEK_IN_YEAR) > 7
Feb 3 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Irvin | last post: by
4 posts views Thread by Gary Paris | last post: by
1 post views Thread by Justin | last post: by
1 post views Thread by Eric IsWhoIAm | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.