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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
|
#5
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |