Solved

Update a field with 3 characters from another field

Posted on 2016-11-21
3
28 Views
Last Modified: 2016-11-21
Hi
I would like to update a field with the first 3 characters from another field
the field to get the first 3 characters from is [Item Reference]
Not sure how this should read in the update query
Gordon
0
Comment
Question by:GiaHughes
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 41895818
using an update query

update TableName
set [fieldname]=Left([Item Reference],3)

Open in new window

or with a criteria

update TableName
set [fieldname]=Left([Item Reference],3)
where [fieldname] is null

Open in new window

0
 
LVL 33

Expert Comment

by:Norie
ID: 41895821
Gordon

Are the 3 characters  to replace the current value in the field?
0
 

Author Closing Comment

by:GiaHughes
ID: 41895824
Thanks for the speedy response
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now