title: Conversion failed when converting nvarchar
body: <p>Can someone assist with the error I have below on this statement</p>
  
  <pre><code>SELECT 
      sh.INTERNAL_SHIPMENT_NUM,sh.shipment_id, sh.carrier,  
      sh.carrier_service,sh.carrier_type,sh.route,sh.customer_name,sh.total_lines,
      sh.total_weight,sh.total_volume,sh.SCHEDULED_SHIP_DATE AS SCHEDULED_SHIP_DATE,sh.total_qty,sh.trailing_sts,
      CASE 
         WHEN sh.CUSTOMER IN (46003204, 30321) 
            THEN 'CHUB' 
            ELSE '' 
      END AS CUSTOMER,
      (SELECT TOP 1 sd.customer_po 
       FROM shipment_detail sd 
       WHERE sd.internal_shipment_num = sh.internal_shipment_num
       ORDER BY sd.CUSTOMER_PO desc) as CUSTOMER_PO, 
      SH.REJECTION_NOTE
  FROM
      shipment_detail sd
  INNER JOIN 
      shipment_header_view sh ON sd.INTERNAL_SHIPMENT_NUM = sh.INTERNAL_SHIPMENT_NUM
  LEFT OUTER JOIN 
      RYDI_orders RO ON SH.SHIPMENT_ID = RO.DELIVERY_id
  WHERE 
      sh.leading_sts = 100 AND sh.trailing_sts = 100
  GROUP BY
      sh.INTERNAL_SHIPMENT_NUM,sh.shipment_id, sh.carrier, 
      sh.carrier_service, sh.carrier_type, sh.customer,
      sh.route, sh.customer_name, sh.total_lines,
      sh.total_weight, sh.total_volume, sh.SCHEDULED_SHIP_DATE,
      sh.total_qty, sh.trailing_sts, SH.REJECTION_NOTE
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Msg 245, Level 16, State 1, Line 1<br>
    Conversion failed when converting the nvarchar value '50310H' to data type int.</p>
  </blockquote>