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

MS Access 2003 Query Concatenation

P: 36
I have a field in a query requesting a criteria " N1N0" or "W1N0".

Basically retrieving all " N1N0 " and "W1N0" values in the column.

Is it possible for me to query that Looks at the N or the W of that field and fills in W or N in the new column?

Basically I want all N1N0 to be N
and all W1N0 to be W
Dec 11 '07 #1
Share this Question
Share on Google+
5 Replies


Rabbit
Expert Mod 10K+
P: 12,383
This isn't really concatenation.. in fact, you're doing the opposite of concatenation.

Left(SomeString, # of characters to strip off)
Dec 11 '07 #2

NeoPa
Expert Mod 15k+
P: 31,615
It looks like you want (to get the leftmost character from the field) :
Expand|Select|Wrap|Line Numbers
  1. Left([Field], 1)
Dec 12 '07 #3

P: 36
Thanks to the both of you.

What I did temporarily was do ASC( ) and then a Switch ( ) .
Which was pretty excessive.
Dec 12 '07 #4

Rabbit
Expert Mod 10K+
P: 12,383
Not a problem.
Dec 12 '07 #5

NeoPa
Expert Mod 15k+
P: 31,615
That's fine, but you should be aware that taking the leftmost char using Asc() will work simply as a side-effect of the function, rather than how the function is designed to work. Clearly though, it will work for you in this situation.
Glad it's working anyway ;)
Welcome to theScripts.
Dec 13 '07 #6

Post your reply

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