Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why doesn't LEFT() work on my PC?

Status
Not open for further replies.

mwolf00

Programmer
Nov 5, 2001
4,177
US
If a table has a number column, I cannot select the left(4,numCol) or right(2, numCol) from my table. However, my coworkers are able to do it - same query and same table structure. Both running MS Access 2000.

Any ideas?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
mwolf00,

1) You may have a issing .dll file. Reinstall your application.

2) Using string functions on numbers might not give you the results that you expect. In some cases you can ues the INT function to truncate on a column, each of which is 100, 101/sup], 102/sup]...

like...
[tt]
INT(numCol/100)
[/tt]
However, if your number column is NOT a column that you would do arithmetic on, like an Invoice or Customer "Number", then your NUMBER is more than likely, treated more like a STRING than a NUMBER -- significant leading zeroes, no math. (INT will still work)

Skip,

[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue]
 
left(4,numCol) or right(2, numCol)
The correct syntax is, I think:
Left(numCol, 4) or Right(numCol, 2)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Good catch PH.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top