d-sizzle302
d-sizzle302

Reputation: 25

How to trim values in a field?

I have a table with field X on MS Access 2013. The values of X look something like this:

X
03100005000605
23656563554354
39994002200340
40100030100310

I want to trim these so only the first 4 digits are given. i.e.:

X-trim
0310
2365
3999
4010

From searching Google, I know there exists a 'LEFT' or 'RIGHT' function, but I can't figure out how to make it work. Please help!

Upvotes: 2

Views: 266

Answers (1)

Alex K.
Alex K.

Reputation: 175766

Simply:

select left(X, 4) as [X-Trim] from [table_name]

Upvotes: 1

Related Questions