Update Query Needed

B

Bikini Browser

Hello everyone...

I have column of prefixes that I need to append numbers too...

My column currently looks like this...

787-222
787-221
787-721

I need to make it look like this...

787-222=787
787-221=787
787-721=787

The table name is LocalFaxPrefixes

How do you add the "=787" to the end of each line in that Cell without
having to do it manually? I Know how to paste an SQL View to a query, I
just don't know how to write it from scratch.

Thanks in advance for your help.

Dale
 
F

fredg

Hello everyone...

I have column of prefixes that I need to append numbers too...

My column currently looks like this...

787-222
787-221
787-721

I need to make it look like this...

787-222=787
787-221=787
787-721=787

The table name is LocalFaxPrefixes

How do you add the "=787" to the end of each line in that Cell without
having to do it manually? I Know how to paste an SQL View to a query, I
just don't know how to write it from scratch.

Thanks in advance for your help.

Dale

If you wish to add "=787" at the end of all of the data in the field,
then use an Update query.

Update LocalFaxPrefixes Set LocalFaxPrefixes.FieldName = [FieldName] &
"=787";

However, if you meant to say you wish to add whatever the first 3
characters are (they might not aleays be 787), then:

Update LocalFaxPrefixes Set LocalFaxPrefixes.FieldName = [FieldName] &
"=" & Left([FieldName],3);

Back up your table data first.
 
B

Bikini Browser

Thanks! It was so easy thanks to you.

People like you are what makes these forums work. Best to you and your
family.

Dale


fredg said:
Hello everyone...

I have column of prefixes that I need to append numbers too...

My column currently looks like this...

787-222
787-221
787-721

I need to make it look like this...

787-222=787
787-221=787
787-721=787

The table name is LocalFaxPrefixes

How do you add the "=787" to the end of each line in that Cell without
having to do it manually? I Know how to paste an SQL View to a query, I
just don't know how to write it from scratch.

Thanks in advance for your help.

Dale

If you wish to add "=787" at the end of all of the data in the field,
then use an Update query.

Update LocalFaxPrefixes Set LocalFaxPrefixes.FieldName = [FieldName] &
"=787";

However, if you meant to say you wish to add whatever the first 3
characters are (they might not aleays be 787), then:

Update LocalFaxPrefixes Set LocalFaxPrefixes.FieldName = [FieldName] &
"=" & Left([FieldName],3);

Back up your table data first.
 

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

Similar Threads


Top