Nevím jestli to je to pravé ořechové, ale ja bych to třeba řešil takhle: SELECT CASE WHEN QUANTITY - CONVERT(decimal(12,1),QUANTITY)>0 THEN CAST(CONVERT(decimal(12,2),QUANTITY) AS VARCHAR(20)) ELSE CASE WHEN QUANTITY - CONVERT(decimal(12,0),QUANTITY)>0 THEN CAST(CONVERT(decimal(12,1),QUANTITY) AS VARCHAR(20)) ELSE CAST(CONVERT(decimal(12,0),QUANTITY) AS VARCHAR(20)) END END AS CONVERT_QUANTITY,
|