Reputation: 3099
I have the following two tables
I need to create a table that would summarize points for each date
How can I do this . I have updraded to Teradata 14 . And I am not quite familiar with all the new functions
Upvotes: 0
Views: 183
Reputation: 60472
If table1 is actually only a few rows you don't need any fancy query.
Assuming table1.caseid is a byteint this will result in a product join:
Select t2.datex, t2.caseid, sum(t1.points)
from table1 as t1 join table2 a t2
on position(trim(t1.caseid) in t2.caseid) > 0
group by 1,2
Of course if this was a properly normalized table you could simple use a t1.caseid = t2.caseid join instead.
Upvotes: 1