Maybe my skull is a little too thick today but I cannot figure out why this is not grouping correctly:
SELECT CAST(Coalesce (RIGHT(EDI_Batch_Number,4), 1325 ) AS VARCHAR(4)) AS 'Batch Number'
,COALESCE(LEFT(Reference_2, 2), 'Grand Total') AS 'S
↧