Home » SQL & PL/SQL » SQL & PL/SQL » Using Weekly data updates to Update a Table by row growth and not column growth (10G R/2)
Using Weekly data updates to Update a Table by row growth and not column growth [message #387987] Sun, 22 February 2009 23:11 Go to next message
TJPokala
Messages: 17
Registered: March 2008
Junior Member
Hi All,

I have Three tables:

Valid_shops to tell you which are valid shops.This data is updated weekly
best_shops are the best shops that you can sell for that month.This data is updated in 6 months
Constraint Shops is a table which tell you shosp which you can sell/not sell to.This data is updated weekly.


create table valid_shops(
Shops varchar2(50),
Alternate Shop varchar2(50),
Validity Char(1),
import_date date);



create table best_shops(
Shops varchar2(50),
Road 1 varchar2(50),
Road 2 varchar2(50));



create table constraint_shops(
Alternate_Shops varchar2(50),
Sellable varchar2(10),
import_date date);


I want to extract the information form these tables week by week for the shops.I don't want to manually create the columns every week to a table/view and refresh it by a procedure to insert the updated data for that week as I have been informed in oracle forum that it is not a valid approach.

The number of columns is

create table hist_shops(
Shops varchar2(50),
Road 1 varchar2(50),
Road 2 varchar2(50),
WeekNo number,
WkNoVal number);

How to use analytic function to get about this.

Any hints will be useful.

Appreciate all feedback.Thank you.
Re: Using Weekly data updates to Update a Table by row growth and not column growth [message #387988 is a reply to message #387987] Sun, 22 February 2009 23:15 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
Throw away existing "design" & (re)design to Third Normal Form.
Re: Using Weekly data updates to Update a Table by row growth and not column growth [message #387991 is a reply to message #387988] Sun, 22 February 2009 23:45 Go to previous messageGo to next message
TJPokala
Messages: 17
Registered: March 2008
Junior Member
Create a separate table and point to the main table identified by PK?

Is it possible to give some hints please.Thanks Swan
Re: Using Weekly data updates to Update a Table by row growth and not column growth [message #387993 is a reply to message #387987] Sun, 22 February 2009 23:50 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
I am sorry to see that GOOGLE is broken for you.
Please wait while repairs are completed.
Additional information will be posted when it is available.
Third Normal Form is your solution if you can reach it.
Re: Using Weekly data updates to Update a Table by row growth and not column growth [message #387998 is a reply to message #387993] Mon, 23 February 2009 00:07 Go to previous messageGo to next message
TJPokala
Messages: 17
Registered: March 2008
Junior Member
Thanks I got it.

And you don't have to have a cynical sarcasm added to it.

Anyway thanks alot.
Re: Using Weekly data updates to Update a Table by row growth and not column growth [message #388026 is a reply to message #387991] Mon, 23 February 2009 00:52 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Normalization

Regards
Michel
Previous Topic: writing qyery ouput on text file and saving at some specific location of local system
Next Topic: Beginner: Need some simple code checking
Goto Forum:
  


Current Time: Sat Dec 03 11:57:10 CST 2016

Total time taken to generate the page: 0.10390 seconds