• ChrisM@Work (8/14/2012)


    dwilliscp (8/14/2012)


    dwilliscp (8/14/2012)


    Thanks for your help... I just could not figure out how to word the statement ... looking at some samples I found on the internet.

    Thanks for the help from both of you.

    yep, problem with the join.. I need to know that there were 55 Notifications, but not get 55 rows. I guess we could do a distinct on the outside query.

    How many rows does this return?

    SELECT

    d.Delivery,

    d.Delivery_Item,

    --n.Sales_Order_Number,

    d.REF_DOC--,

    --n.Notification_cnt

    FROM ztb_Carrier_Delivery_Metrics d

    WHERE d.REF_DOC = '0002619226'

    You get 6 rows, different deliveries though. (since it seems to omit tabs, I am going to try spaces. The Prime Key in the Carrier Delivery Metrics is Delivery, Line..but the Notifications file only has sales order. Ok does not like spaces so will Use underscores)

    Delivery__________Line_________Sales Order

    0085180733______900015_______0002619226

    0085186304______900003_______0002619226

    0085159667______900003_______0002619226

    0085177217______900003_______0002619226

    0085184918______900012_______0002619226

    0085192416______900001_______0002619226