Trey,
Thanks for the tip. I slight modification to your suggestion allows my users to search for any of 1-9 digits of the zip code:
where 1 in (patindex('84152%',zip), patindex('943%',zip), patindex('220461934',zip))
What experience do you have re: relative performance of this type of query?
Does this sort of pattern matching slow things down considerably? My core data is 2-5 million records.
>select au_id, au_lname, au_fname, zip
> from authors
> where 1 in (patindex('84152____',zip), patindex('94301____',zip))
Timothy D. Yeaney
MCSD, Charter Member
President, PAFOX (Potomac Area Fox User Group)
mailto:
tim@eagleeyeinc.com Vice President
Eagle Eye Publishers, Inc
Broaden Your Vision, Sharpen Your Focus