473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

The Concatenation Query and Space Removal

Is there a way to create a Concatenation Query for 2 columns and at
the same time, remove the spacing between them? The fields that I am
combining are 2 text fields but for some reason there is 15 spaces
between them when I combine.

Jul 19 '07 #1
2 6948
On Wed, 18 Jul 2007 23:58:10 -0000, mo*******@gmail.com wrote:
Is there a way to create a Concatenation Query for 2 columns and at
the same time, remove the spacing between them? The fields that I am
combining are 2 text fields but for some reason there is 15 spaces
between them when I combine.
Evidently your field contains the extra spaces at the beginning of the
data, as concatenation does not add them.

CombineFields:Trim([Field1]) & Trim([Field2])

If you wish at least one space between the 2 fields, then:
CombineFields:Trim([Field1]) & " " & Trim([Field2])

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jul 19 '07 #2
On Jul 18, 5:11 pm, fredg <fgutk...@example.invalidwrote:
On Wed, 18 Jul 2007 23:58:10 -0000, mochat...@gmail.com wrote:
Is there a way to create a Concatenation Query for 2 columns and at
the same time, remove the spacing between them? The fields that I am
combining are 2 text fields but for some reason there is 15 spaces
between them when I combine.

Evidently your field contains the extra spaces at the beginning of the
data, as concatenation does not add them.

CombineFields:Trim([Field1]) & Trim([Field2])

If you wish at least one space between the 2 fields, then:
CombineFields:Trim([Field1]) & " " & Trim([Field2])

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Thanks Fred,

That did the trick!

- Randy

Jul 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jonathan | last post by:
Why did the designers of PHP decide to use period (".") as the string concatenation operator rater than the obviously more logical plus ("+")? //JJ
1
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of...
2
by: David Richards | last post by:
Hi, Hopefully someone can help me. I have setup a continuous form that displays customer names and addresses. I have then place a txt box on the form header. Using the onChange event I've setup...
33
by: genc_ymeri | last post by:
Hi over there, Propably this subject is discussed over and over several times. I did google it too but I was a little bit surprised what I read on internet when it comes 'when to use what'. Most...
3
by: shubhangi | last post by:
Hi, I am unable to concat 2 fields with a space between them in sql query. I want to write my query in following fashion only as there are many conditions which I concat. Thus I am using variable...
2
by: shubhangi | last post by:
Hi, I have previously posted but the reply given didn't solve my purpose. Please check & revert. I am unable to concat 2 fields with a space between them in sql query. I want to write my...
34
by: Larry Hastings | last post by:
This is such a long posting that I've broken it out into sections. Note that while developing this patch I discovered a Subtle Bug in CPython, which I have discussed in its own section below. ...
1
by: enigma0879 | last post by:
Suppose in the field of a column there is a value as I am a good and nice guy. I would like to make it appear as I am a good and nice guy by writing a query. Now the content is dynamic and...
1
by: =?Utf-8?B?UGFzcXVhbGU=?= | last post by:
I want to send an email with smtpclient. I have created a MailMessage with body obtained as concatenation between a fixed string, that finishes with a space, and a string variable. The code is as...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.