View Full Version : Group by Question


spalmateer
05-15-2002, 09:11 PM
I have a query that summarizes sales by zipcode. Our zipcodes are stored in the ?????-???? format therefore the report has hundreds of different zip codes. Is there a way to group them by just the first five digits? I've tried Like "?????" but that only returns zips with the first five digits and not the ones with the last four. Thanks!
Scott

helenlou
05-16-2002, 12:48 AM
In the Field cell of Postcode in Query Design View type something like this:
FirstFive: Left([Post code],5)

This will create a field called FirstFive which groups Postcodes according to the first five digits.