sum of a column in between two limits

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

sum of a column in between two limits

Post 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
RAJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post 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: ...
The tables are from different database!!
RAJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

gssr wrote:The tables are from different database!! "
You did not state that earlier.

Use a range lookup.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post 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!!

:roll:

Ray,
I will try range Lookup.
RAJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply