![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 13 Mar 2008 @ 00:03:23 GMT
Bob, 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. -Fred
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 16 Nov 2008 | ||||||||||||||||||||||||||||||||||||||||||||||||