0

tables for the problem

I am trying to remove any periods or part of periods for the same id from one table if the period, or part of the period, appears in another table in Teradata.

In the image as a reference. I would like to remove any periods from the start table if they appear in the remove table to get the result table All the group A rows would be removed and the B rows would be kept with the second B row being split into two periods. Is this possible?

JoeM
  • 1
  • 1
  • Have you tried anything yet? Let us know what didn't work and we can point you in the right direction – CallumDA Dec 01 '16 at 13:00
  • I've tried something like the below but I end up keeping too much information. select a.id, a.group, b.pd LDIFF a.pd from start a inner join remove b on a.id = b.id and b.pd LDIFF a.pd IS NOT NULL union select a.id, a.group, b.pd RDIFF a.pd from start a inner join remove b on a.id = b.id and b.pd RDIFF a.pd IS NOT NULL – JoeM Dec 01 '16 at 14:57

0 Answers0