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  

Adding Prefix to multiple rows n Access? Help!



 
 
Thread Tools Display Modes
  #1  
Old May 23rd, 2005, 06:53 AM
Christine via AccessMonster.com
external usenet poster
 
Posts: n/a
Default Adding Prefix to multiple rows n Access? Help!

Hi,
I am trying to add Prefix to about 1500 rows in an access table.
e.g. if there is dfferent data in 1500 rows, I would like to add "AD - "
infront of each row.
Is is possible in Access without typing this manually?
I would really appreciate any response.
Thanks,
Christine
  #2  
Old May 23rd, 2005, 01:16 PM
David Lloyd
external usenet poster
 
Posts: n/a
Default

Christine:

If you are trying to add "AD -" to the beginning of one field in the row
then the following query would be one alternative.

UPDATE Test1 SET Test1.TextField = "AD -" & "TextField";

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"Christine via AccessMonster.com" wrote in
message news:ce2be60a4ef94e1ab13cda97c87d2d26@AccessMonste r.com...
Hi,
I am trying to add Prefix to about 1500 rows in an access table.
e.g. if there is dfferent data in 1500 rows, I would like to add "AD - "
infront of each row.
Is is possible in Access without typing this manually?
I would really appreciate any response.
Thanks,
Christine


  #3  
Old May 23rd, 2005, 01:29 PM
David Lloyd
external usenet poster
 
Posts: n/a
Default

Christine:

My syntax was off just slightly. Please try the following:

UPDATE Test1 SET Test1.TextField = "AD -" & [TextField];


--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"Christine via AccessMonster.com" wrote in
message news:ce2be60a4ef94e1ab13cda97c87d2d26@AccessMonste r.com...
Hi,
I am trying to add Prefix to about 1500 rows in an access table.
e.g. if there is dfferent data in 1500 rows, I would like to add "AD - "
infront of each row.
Is is possible in Access without typing this manually?
I would really appreciate any response.
Thanks,
Christine


  #4  
Old May 23rd, 2005, 09:49 PM
Christine via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Got it. Thanks a mil.

--
Message posted via http://www.accessmonster.com
  #5  
Old May 23rd, 2005, 10:27 PM
Christine via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Sorry, actually I am trying to update 1500 rows? Your query gives me option
for one at a time instead of automating it?

--
Message posted via http://www.accessmonster.com
  #6  
Old May 23rd, 2005, 10:44 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

Christine via AccessMonster.com wrote:
Sorry, actually I am trying to update 1500 rows? Your query gives me
option for one at a time instead of automating it?


No, it updates all the rows at once. There is no where clause so all
records are affected.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #7  
Old May 24th, 2005, 07:51 AM
Wasim Yasin via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

I also want to use this but where should I write it? It is code or it is
syntax for criteria? please tell me in detail?

--
Message posted via http://www.accessmonster.com
  #8  
Old May 24th, 2005, 08:02 AM
Wasim Yasin via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Yes I did it. But it replaced the contents of field rather to add as prefix?
how it will work?

--
Message posted via http://www.accessmonster.com
  #9  
Old May 24th, 2005, 12:50 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

Wasim Yasin via AccessMonster.com wrote:
Yes I did it. But it replaced the contents of field rather to add as
prefix? how it will work?


Look at the SQL again...

UPDATE Test1 SET Test1.TextField = "AD -" & [TextField];

It says set the field TextField to the combination of "AD -" and itself added to
the end. So...

SomeText

....will become...

AD -SomeText


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #10  
Old May 25th, 2005, 06:19 AM
Wasim Yasin via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

I did again but the result is here.
filed name=Customer
Contents=1120546859
change to =BL-

After running the query the result is
field contents=BL-0546859

and agian running the query result is

filed contents = BL-BL-6859

???????

What I do now?
The select query I'm using is
UPDATE [Nil-Question] SET [Nil-Question].Customer = "BL-" & [customer];

--
Message posted via http://www.accessmonster.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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to export all rows from a access query to excel Venky General Discussion 1 February 25th, 2005 01:57 AM
Access XP Compared to Access 2003 Mardene Leahu New Users 1 October 1st, 2004 05:11 AM
Access License In Terminal Server JIM.H. General Discussion 9 July 19th, 2004 12:32 AM
Retrieving Count of rows returned from MS Access Query Don General Discussion 2 June 27th, 2004 07:54 PM


All times are GMT +1. The time now is 07:03 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.