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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Make Table query, but remove character from field



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2010, 10:41 AM posted to microsoft.public.access.queries
Andy
external usenet poster
 
Posts: 941
Default Make Table query, but remove character from field

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
  #2  
Old May 5th, 2010, 10:47 AM posted to microsoft.public.access.queries
Andy
external usenet poster
 
Posts: 941
Default Make Table query, but remove character from field

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

"Andy" wrote:

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

  #3  
Old May 5th, 2010, 11:00 AM posted to microsoft.public.access.queries
XPS350
external usenet poster
 
Posts: 69
Default Make Table query, but remove character from field

On 5 mei, 11:41, Andy wrote:
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
  #4  
Old May 5th, 2010, 12:03 PM posted to microsoft.public.access.queries
Andy
external usenet poster
 
Posts: 941
Default Make Table query, but remove character from field

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

"XPS350" wrote:

On 5 mei, 11:41, Andy wrote:
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
.

  #5  
Old May 5th, 2010, 12:16 PM posted to microsoft.public.access.queries
xps35
external usenet poster
 
Posts: 22
Default Make Table query, but remove character from field

=?Utf-8?B?QW5keQ==?= wrote:


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

"XPS350" wrote:

On 5 mei, 11:41, Andy wrote:
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
.


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

  #6  
Old May 5th, 2010, 01:32 PM posted to microsoft.public.access.queries
Andy
external usenet poster
 
Posts: 941
Default Make Table query, but remove character from field

Thanks

"XPS35" wrote:

=?Utf-8?B?QW5keQ==?= wrote:


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

"XPS350" wrote:

On 5 mei, 11:41, Andy wrote:
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
.


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

.

 




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 03:17 PM.


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