Page 1 of 1
sum of a column in between two limits
Posted: Mon May 17, 2010 3:03 am
by gssr
HI all..
I am having two tables
Tab1 :
sales Date
5 29/01/2010
8 31/01/2010...
Tab2 :
Start_Date End Date
29/01/2010 05/02/2010
06/02/2010 19/02/2010...
Need to get the sum of sales for each set of date limits!
Thanks in advance
Posted: Mon May 17, 2010 3:46 am
by ray.wurlod
You don't need DataStage to do that. It's straightforward DML.
DataStage is an ETL tool, not a reporting tool!
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
Posted: Mon May 17, 2010 4:46 am
by gssr
ray.wurlod wrote:You don't need DataStage to do that. It's straightforward DML.
DataStage is an ETL tool, not a reporting tool!
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
...
The tables are from different database!!
Posted: Mon May 17, 2010 4:50 am
by ray.wurlod
gssr wrote:The tables are from different database!! "
You did not state that earlier.
Use a range lookup.
Posted: Mon May 17, 2010 4:57 am
by Sainath.Srinivasan
I don't see how having them in different database makes it an ETL requirement.
If the result will be presented in a report, it is still a reporting requirement.
You can use dblinks in Database level or any reporting tool capabilities to pull and merge the data.
Posted: Mon May 17, 2010 5:04 am
by gssr
Sainath.Srinivasan wrote:I don't see how having them in different database makes it an ETL requirement.
If the result will be presented in a report, it is still a reporting requirement.
You can use dblinks in Database l ...
Need to query it and load it to DW table.. To make the situation simple and understandable , i didnot metion it!!
Ray,
I will try range Lookup.
Posted: Mon May 17, 2010 6:29 am
by chulett
gssr wrote:Need to query it and load it to DW table.. To make the situation simple and understandable , i didnot metion it!!
Roll your eyes all you want but you are doing yourself a disservice making your situation "simpler" by leaving out critical bits of information needed to supply a proper solution. Next time -
complete, not simple. Mention it. Please.