Archives of the TeradataForum
Message Posted: Wed, 13 Mar 2008 @ 00:03:23 GMT
If I am interpreting what you describe correctly why don't you try the following?
(a.serial_number = b.beg_serial_num or a.serial_number = b.end_serial_num)
If you have customers that have serial numbers between the range beg_serial_num and end_serial_num then since the ranges are non overlapping you might want to create an id code identifying a serial group and use that surogate key to join on. The other alternative is to materialize a complete list of all the between serial codes so you don't need to use the between condition to join on at all.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|