Make Table query, but remove character from field

A

Andy

I already have a rroutine set up and part of that is a make table query. One
of my fields has some values as G35.X and some as G35X.

I want to make this field in my make table query read G35X for all. I do not
want to run update queries or find/replace and want in my make table
definition some code that when creating this field to remove the "." where it
exists. Is this possible?
Thanks
 
A

Andy

Sorry, I should have made clear I can't just set the field to "G35X" as there
are other values with the "." !
 
X

XPS350

I already have a rroutine set up and part of that is a make table query. One
of my fields has some values as G35.X and some as G35X.

I want to make this field in my make table query read G35X for all. I do not
want to run update queries or find/replace and want in my make table
definition some code that when creating this field to remove the "." where it
exists. Is this possible?
Thanks

You can replace an make a table at the same time:
SELECT Replace(YourCode,".","") AS NewCode INTO T2 FROM T1;


Groeten,

Peter
http://access.xps350.com
 
A

Andy

Thanks for your reply. Could you clarify a little more please as I usually
write things in design view and am not very good with SQL view. Also, what
are T1 and T2?

Thanks
 
X

XPS35

=?Utf-8?B?QW5keQ==?= said:
Thanks for your reply. Could you clarify a little more please as I usually
write things in design view and am not very good with SQL view. Also, what
are T1 and T2?

Thanks

T1 is the name of your original table (with G35.X-like values), T2 is
the table to be created. Change those to the names you want.
YourCode is the field name in T1 containing "G35.X". Change that name
also.

You can enter the string in SQL-view and switch to design view to see
what it looks like in that view. You can also make the changes you need
in design view.
 
A

Andy

Thanks

XPS35 said:
T1 is the name of your original table (with G35.X-like values), T2 is
the table to be created. Change those to the names you want.
YourCode is the field name in T1 containing "G35.X". Change that name
also.

You can enter the string in SQL-view and switch to design view to see
what it looks like in that view. You can also make the changes you need
in design view.

--
Groeten,

Peter
http://access.xps350.com

.
 

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