|
Posted by Rnt6872 on 12/13/06 19:10
Thank you. I'll try that.
Roy Harvey wrote:
> 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]
|