PADR(lcZip,9,"_")
and make the SQL call sim to this (I modified pubs.authors to have 9 digit zip code - the ones below have multiple records already - I changed one each to be 9 and left the rest at 5)select au_id, au_lname, au_fname, zip > from authors > where 1 in (patindex('84152____',zip), patindex('94301____',zip))If you try this with pubs, the Check constraint also needs to modified on the zip field to add 4
[0-9 ]
(there is a space after 0-9) to the contstraint.