Data Warehousing Community Forum
The Warehouse of Data warehousing knowledge ...
Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
September 09, 2010, 06:32:05 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Light Blue
Light Navy
Light Silver
Light Turquoise
Light Green
Light Olive
Light Golden
Light Brown
Light Red
Light Rose
Light Lilac
Light Violet
Data Warehousing Community Forum
>
Databases
>
Oracle
>
PL/SQL
> Topic:
Some help needed
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Some help needed (Read 300 times)
haria_kishore
DW Fresher
Reputation: +2/-1
Offline
Posts: 2
Some help needed
«
on:
May 06, 2009, 04:17:18 pm »
hi
I have 3 tables - table1,table2,table3
table1 has 3 columns named col1,col2 and col3 and has 1 dummy record with values 0,1,2 respectively. The other records are my master records
col1 col2 col3
0 1 2
A B C
AA BB C
D E F
table 2 has the mapping of the column as shown below
ColNo Name Descr Conditon
0 ABC BC Yes
1 DEF DE No
2 GHI GH Yes
Now i have to populate values in table 3 from table 2 and table 1
The logic is as follows
Suppose first i read col1 from table1. I look and take the value 0 (dummy value) and i check the in table 2 if for 0 the condition is Yes or No. If its No I ignore the col1 and move to col2. If not i start populating values of col1 first and then move to next col2.
In the above table shown above, since condition for 0 is Yes i read values for col1 (which will be A,AA,D) and from table 2 i read value for 0 (ABC,BC) and populate it in table3. Once all data is populated for col1, i move to col2. Since col2 condition is No in Table2, i ignore col2 and then i finally read col3 (the condition is Yes for col3 in Table2) and my table3 should look as follows
ColNo Typ Name Descr
0 A ABC BC
0 AA ABC BC
0 D ABC BC
2 C GHI GH
2 F GHI GH
This can be accomplished either using functions or PL/SQL procedure
Logged
Sipra
Founder
Reputation: +35/-0
Offline
Posts: 238
I am the King...
Re: Some help needed
«
Reply #1 on:
May 11, 2009, 04:21:16 pm »
@
Kishore
-
Don't do create
duplicate
posts.
Cleaned it finally
and please do post the threads with proper subject.
And please go thru the
Forum Rules
in prior to posting.
«
Last Edit: May 11, 2009, 04:27:15 pm by Sipra
»
Logged
Sipra
Founder
www.dwforum.net
Pages: [
1
]
Go Up
Print
Data Warehousing Community Forum
>
Databases
>
Oracle
>
PL/SQL
> Topic:
Some help needed
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Introductions
=> Rules
=> Anouncements & News
=> Suggestions
=> General Discussion
=> Job Opportunities
-----------------------------
Databases
-----------------------------
=> Oracle
===> PL/SQL
=> Microsoft SQL Server
=> IBM DB2
=> Teradata
-----------------------------
Data Warehousing
-----------------------------
=> Data Warehousing Concepts
=> Data Modeling
-----------------------------
ETL Tools
-----------------------------
=> Informatica
===> Installation & Configuration
=> Data Stage
=> Ab Initio
=> Oracle Warehouse Builder
=> DTS/SSIS
-----------------------------
Reporting Tools
-----------------------------
=> Business Objects
=> Cognos
=> Crystal Reports
=> Hyperion
=> Brio
=> Microstrategy
-----------------------------
Operating Systems
-----------------------------
=> UNIX / Linux
===> Unix Shell Scripting
=> Windows
-----------------------------
Other Technologies & Tools
-----------------------------
=> JAVA
-----------------------------
Guest Forum
-----------------------------
=> Guest Forum
Loading...