• Hello Tahir,

    two points:

    1. Use UNION ALL instead of UNION. Since you have distinct rows in both tables you don't need to remove duplicates.

    2. Cast or convert the date string to a smalldatetime:

    SELECT * FROM t12 WHERE dob>=CAST('20070101' AS smalldatetime)

    Best Regards,

    Chris Büttner