|
Posted by Roy Harvey on 12/13/06 18:47
On 13 Dec 2006 09:47:01 -0800, "Rnt6872" <r_fordjr@msn.com> wrote:
>How do I select the records using substring(o.bol,4,7) to add to the
>above query? How do I inner join the records based on adding the
>substring extracted o.bol?
I don't know just what you are asking. The existing query already
uses a substring - well, RIGHT() in this case, but the same idea - to
perform the LEFT OUTER JOIN.
FROM upsOutbound o
LEFT OUTER
JOIN msoutboundhistory m
ON right(o.bol,7) = m.FRRDSSShipmentNbr
AND o.bol = m.FRRDSSShipmentNbr
If you have another test for substring(o.bol,4,7) you should be able
to use the same approach but with substring() instead of right().
Roy Harvey
Beacon Falls, CT
Navigation:
[Reply to this message]
|