A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to Concatenate in MS Access



 
 
Thread Tools Display Modes
  #1  
Old October 31st, 2008, 05:25 PM posted to microsoft.public.access
ttp
external usenet poster
 
Posts: 24
Default How to Concatenate in MS Access

I have (2) different issues related to concatenate. In one instance, I want
to trim the last character of a string and compare it to a field in another
table. And in the other instance, I want to combine two fields so that I can
compare that new field with a field in another table.

1: I have a field with the value 123456S in one table. And a field with
123456 in another table. How do I remove the S from the field in the first
table and then compare it to the field in the second table?

2: I have a table with a field with the following data: GR12345-2. In
another table, there are two fields which create this value: field 1:
GR12345 and field 2: 2. How do I combine field 1 and 2 in the second table
to compare it to the field in the 1st table?
  #2  
Old October 31st, 2008, 05:46 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default How to Concatenate in MS Access

Queries...

Create a query that removes the "S". Use THAT query to join with a second
table.

Create a query that concatenates the fields (with appropriate symbols). Use
THAT query to join with you other second table.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"ttp" wrote in message
...
I have (2) different issues related to concatenate. In one instance, I
want
to trim the last character of a string and compare it to a field in
another
table. And in the other instance, I want to combine two fields so that I
can
compare that new field with a field in another table.

1: I have a field with the value 123456S in one table. And a field with
123456 in another table. How do I remove the S from the field in the
first
table and then compare it to the field in the second table?

2: I have a table with a field with the following data: GR12345-2. In
another table, there are two fields which create this value: field 1:
GR12345 and field 2: 2. How do I combine field 1 and 2 in the second
table
to compare it to the field in the 1st table?



  #3  
Old October 31st, 2008, 05:49 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default How to Concatenate in MS Access

1. To remove the last character of a string, you can use

Left([NameOfField], Len([NameOfField]) - 1)

2. [Field1] & "-" & [Field2]


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"ttp" wrote in message
...
I have (2) different issues related to concatenate. In one instance, I
want
to trim the last character of a string and compare it to a field in
another
table. And in the other instance, I want to combine two fields so that I
can
compare that new field with a field in another table.

1: I have a field with the value 123456S in one table. And a field with
123456 in another table. How do I remove the S from the field in the
first
table and then compare it to the field in the second table?

2: I have a table with a field with the following data: GR12345-2. In
another table, there are two fields which create this value: field 1:
GR12345 and field 2: 2. How do I combine field 1 and 2 in the second
table
to compare it to the field in the 1st table?



  #4  
Old October 31st, 2008, 07:52 PM posted to microsoft.public.access
Larry Linson
external usenet poster
 
Posts: 3,112
Default How to Concatenate in MS Access

It would be immensely helpful to those trying to help you if you would
_define_ the values you want to manipulate, instead of giving an unexplained
example. For instance, where you show "123456S", that could be a numeric
with a concluding alpha-numeric and you want to strip the last character,
but it could also just be mixed numeric and alphanumerics from which you
want to remove all alphanumeric characters, or it could be something else
again. Each would require a different approach.

For other good suggestions on effective use of newsgroups, see the FAQ at
http://www.mvps.org/access/netiquette.htm.

Larry Linson
Microsoft Office Access MVP
"ttp" wrote in message
...
I have (2) different issues related to concatenate. In one instance, I
want
to trim the last character of a string and compare it to a field in
another
table. And in the other instance, I want to combine two fields so that I
can
compare that new field with a field in another table.

1: I have a field with the value 123456S in one table. And a field with
123456 in another table. How do I remove the S from the field in the
first
table and then compare it to the field in the second table?

2: I have a table with a field with the following data: GR12345-2. In
another table, there are two fields which create this value: field 1:
GR12345 and field 2: 2. How do I combine field 1 and 2 in the second
table
to compare it to the field in the 1st table?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.