Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: select statement

    Woops, that second ISNULL should be zero - assuming you don't have any negative costs.

  • RE: select statement

    How about something like this...

    SELECT

    TD.col_id

    ,TM.colid

    ,CASE WHEN ISNULL(TD.Cost, 999999) < ISNULL(TN.Cost, 999999) THEN TD.Cost ELSE TM.Cost END AS 'Lowest Cost'

    FROM

    test_td AS TD

    FULL OUTER JOIN test_im AS IM ON IM.MfgPartNbr = TD.MfgPartNbr

    ...

Viewing 2 posts - 1 through 2 (of 2 total)