View Full Version : Need some help with a left function


rkrause
09-13-2007, 06:11 AM
I have an imported table with zipcodes, some are 5 digit some are 9. When i go to build my query i dont get an accurate number, i tried a left function to get the 1st 5 digits but keep getting a invalid syntax. I am in the query builder. anyone help me with syntax, heres what i currently have

Mail Zipcode «Expr» Left («stringexpr», «n»)

Guus2005
09-13-2007, 06:21 AM
What do the zipcodes look like?
What do you want?

Out of the blue:
Select left(zipcode,5) as Zipme from ZipcodeTable

rkrause
09-13-2007, 06:22 AM
zip codes look like 57252-5555

i want 57252

boblarson
09-13-2007, 06:34 AM
In the builder it would be:

MailZipCode:Left([YourZipFieldNameInBrackets],5)