By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,808 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Split a column

P: 3
Hi,

I am newbie in access, so sorry for stupid question. I would like to split column in to the two parts. And i am not sure how. I found this function LEFTbut it doesn't work for me. You can even try VBA one me, but basic function will be better.

Well, i have this column named HDG 2 ( in czech it is main diagnosis) and in cells codes like J040 or M5302. And I want only column with first four digits.

Thank you for answer and patience.
Apr 9 '15 #1

✓ answered by NeoPa

Something like the following then :
Expand|Select|Wrap|Line Numbers
  1. SELECT Left([HDG 2],4) AS [NewHDG2]
  2. FROM   [YourTable]
If, for any reason, you find this doesn't work then please explain what does happen. It's very hard to work in a vacuum, and it does work generally. If it doesn't for you then we need clues to help us determine what is different about what you're doing than the norm.

Hopefully it will work of course :-)

Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,769
Do you want to display the first four characters of each value in a query? I'm struggling to understand what you want and what you are starting with.
Apr 10 '15 #2

P: 3
Yeah, exactly... First four characters of each value in a query. And HDG 2 is name of variable and J040 or M5302 (so, it can be four characters or five characters) are examples of variable.
Apr 10 '15 #3

NeoPa
Expert Mod 15k+
P: 31,769
Something like the following then :
Expand|Select|Wrap|Line Numbers
  1. SELECT Left([HDG 2],4) AS [NewHDG2]
  2. FROM   [YourTable]
If, for any reason, you find this doesn't work then please explain what does happen. It's very hard to work in a vacuum, and it does work generally. If it doesn't for you then we need clues to help us determine what is different about what you're doing than the norm.

Hopefully it will work of course :-)
Apr 10 '15 #4

P: 3
Great!! thank you. It works
Apr 12 '15 #5

NeoPa
Expert Mod 15k+
P: 31,769
Great. No need to delve further then :-)
Apr 12 '15 #6

Post your reply

Sign in to post your reply or Sign up for a free account.