Drop spaces from imported table

J

jdbit2byte

I am importing a table from another DB that has job numbers and descriptions.
My database goes off of these job numbers for referencing.
Problem is the data is imported as centered in the field.
so I end up with [ 1213 ] in my job number field.
I do have a query that runs through this table and selects the data I need,
I believe that this query would be the place to fix the "center" align.
Though I am having troubles finding how to do this
I need to end up with job numbers that have no spaces ie. [1213]
(brackets are showing beginning and end of the field).

Thanks,
JD
 
J

jdbit2byte

Trim only seems to work with strings, but this field is a number. Is there a
way to use Trim() with numbers?

thx
JD

Dennis said:
use the TRIM() function.

jdbit2byte said:
I am importing a table from another DB that has job numbers and descriptions.
My database goes off of these job numbers for referencing.
Problem is the data is imported as centered in the field.
so I end up with [ 1213 ] in my job number field.
I do have a query that runs through this table and selects the data I need,
I believe that this query would be the place to fix the "center" align.
Though I am having troubles finding how to do this
I need to end up with job numbers that have no spaces ie. [1213]
(brackets are showing beginning and end of the field).

Thanks,
JD
 
K

KARL DEWEY

Numbers do not have spaces. Text that is numerials can appear to be a number.
Trim will remove leading, trailing, and double spaces.
To remove all spaces use this ---
Space_Less: Replace([YourFieldName], " ", "")

--
KARL DEWEY
Build a little - Test a little


jdbit2byte said:
Trim only seems to work with strings, but this field is a number. Is there a
way to use Trim() with numbers?

thx
JD

Dennis said:
use the TRIM() function.

jdbit2byte said:
I am importing a table from another DB that has job numbers and descriptions.
My database goes off of these job numbers for referencing.
Problem is the data is imported as centered in the field.
so I end up with [ 1213 ] in my job number field.
I do have a query that runs through this table and selects the data I need,
I believe that this query would be the place to fix the "center" align.
Though I am having troubles finding how to do this
I need to end up with job numbers that have no spaces ie. [1213]
(brackets are showing beginning and end of the field).

Thanks,
JD
 
J

jdbit2byte

When I use Space_Less: Replace([YourFieldName], " ", "") or Trim() it trims
out all of the field. I tried adding an entry with [ TestInput ] and ran
the query. It returned only the added entry as [TestInput], so it works...
but it removes all the entries that I am importing that are numbers. So,
entries like [ 1213 ] are eliminated completely.

I am using an import table to get the data from another database through an
ODBC. Then running the queries off of the Access imported table.


KARL DEWEY said:
Numbers do not have spaces. Text that is numerials can appear to be a number.
Trim will remove leading, trailing, and double spaces.
To remove all spaces use this ---
Space_Less: Replace([YourFieldName], " ", "")

--
KARL DEWEY
Build a little - Test a little


jdbit2byte said:
Trim only seems to work with strings, but this field is a number. Is there a
way to use Trim() with numbers?

thx
JD

Dennis said:
use the TRIM() function.

:

I am importing a table from another DB that has job numbers and descriptions.
My database goes off of these job numbers for referencing.
Problem is the data is imported as centered in the field.
so I end up with [ 1213 ] in my job number field.
I do have a query that runs through this table and selects the data I need,
I believe that this query would be the place to fix the "center" align.
Though I am having troubles finding how to do this
I need to end up with job numbers that have no spaces ie. [1213]
(brackets are showing beginning and end of the field).

Thanks,
JD
 
J

jdbit2byte

Ok so I tried this on the queries further in the process and it worked.
Naturally I would like to have the make table query trim the job numbers so
the data itself is correct. Otherwise all my reports with need the
Replace([YourFieldName], " ", "")
command in their queries. Do this functions not work the same on "Make
table Queries"?

KARL DEWEY said:
Numbers do not have spaces. Text that is numerials can appear to be a number.
Trim will remove leading, trailing, and double spaces.
To remove all spaces use this ---
Space_Less: Replace([YourFieldName], " ", "")

--
KARL DEWEY
Build a little - Test a little


jdbit2byte said:
Trim only seems to work with strings, but this field is a number. Is there a
way to use Trim() with numbers?

thx
JD

Dennis said:
use the TRIM() function.

:

I am importing a table from another DB that has job numbers and descriptions.
My database goes off of these job numbers for referencing.
Problem is the data is imported as centered in the field.
so I end up with [ 1213 ] in my job number field.
I do have a query that runs through this table and selects the data I need,
I believe that this query would be the place to fix the "center" align.
Though I am having troubles finding how to do this
I need to end up with job numbers that have no spaces ie. [1213]
(brackets are showing beginning and end of the field).

Thanks,
JD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top