In reply to James C Tetterton.

Hi James! PROC SQL doesn't filter or group values that have been recoded with SAS formats -- it works on the raw value only. Why? Maybe because it's "SQL first, SAS proc second" in terms of expected behavior.

Other SAS procs will use the formatted value for grouping/classification (BY and CLASS statements), but I think you'll find that filtering (WHERE) still uses the raw value. Consider SAS dates, which are just numbers. You can't compare with the formatted value (unless you use the literal syntax like 'mmddyyyy'd -- which is converted to a number before comparison). User formats work the same.