79302209

Date: 2024-12-23 05:18:41
Score: 1.5
Natty:
Report link

Here are two queries using a UNION or UNION ALL

/* Combine Process */
SELECT Fld1, Fld2, Fld3, Fld4, NULL AS Late
FROM Table01
WHERE xDate = CONVERT(date, '20240101', 112)

UNION ALL

SELECT Fld1, Fld2, Fld3, Fld4, 1 AS Late
FROM Table01
WHERE xDate < CONVERT(date, '20241201', 112);

Output:

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Umesh Singh