472,354 Members | 2,238 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

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, 70 views)
Jan 11 '11 #1
3 4570
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

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

Similar topics

2
by: Irvin | last post by:
I new to ASP.net and am using the following code to attempt to update an Access 2000 mdb. The code does make it through the code following "try". NO rows are updated. There is a row with the...
4
by: Gary Paris | last post by:
This should be simple but I can't get it to work. I want to update a single row of data in a table. ES.Clear() Dim strSQL As String = "Select * from Contact where sysid = '" & g_sysID & "'"...
6
by: mike11d11 | last post by:
I'm trying to create an application that will have multiple users working off a table on a SQL server. Since multi users will be updating different records at any given moment, how can i get those...
1
by: Justin | last post by:
I'm looping through my dataset and when I find a match I need to update a second field. However with this code ONLY the last record in the entire set/table is updated with ALL the records data: ...
0
by: narpet | last post by:
Hello all... Using C# I am getting data for a form from a sql database table. I am able to get the data correctly (with appropriate dataset and table adapter), but I can't figure out how to add...
14
by: bcap | last post by:
Hello, I really would apprciate help! =) What I want to do is be able to change the status of mulitple records using a drop down and a checkbox. I have a drop down called "ChangeStatus"...
1
by: Eric IsWhoIAm | last post by:
I have three tables: Courses (Key is Autonumber Course Number, also have Text Course Name); Instructors (similar fields); and Courses and Instructors (have a combination of the four fields). ...
4
by: Russel0725 | last post by:
This is the table structure I'm trying to query: Storename varchar 50 Bussinessdate datetime 8 txnnumber text 16 subtotal float 8...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.