PC Review


Reply
Thread Tools Rate Thread

Altering data within columns

 
 
Mark909
Guest
Posts: n/a
 
      12th Nov 2008
I have received some data with postcode information.

However there has been an error with data entry so half the postcode
information had a space between the first 3 alphanumerics and the other half
dont have a space.

i.e half have been entered as NH116BZ

the other half have been entered as NH12 8NZ

Is there a way I can alter the text in the column so that all the data will
be displayed with a space in the centre?
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      12th Nov 2008
Assuming you want this change made permanently, you could use an Update
query along the lines of:

UPDATE MyTable
SET MyField = Left([MyField], 3) & " " & Mid([MyField], 4)
WHERE Mid([MyField], 4) <> " "

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Mark909" <(E-Mail Removed)> wrote in message
news:BF205035-2535-4CDB-86E1-(E-Mail Removed)...
>I have received some data with postcode information.
>
> However there has been an error with data entry so half the postcode
> information had a space between the first 3 alphanumerics and the other
> half
> dont have a space.
>
> i.e half have been entered as NH116BZ
>
> the other half have been entered as NH12 8NZ
>
> Is there a way I can alter the text in the column so that all the data
> will
> be displayed with a space in the centre?



 
Reply With Quote
 
Mark909
Guest
Posts: n/a
 
      13th Nov 2008
Thanks for that. However im completely new to access and am struggling with
the query.

Any chance of a step by step walk through??



"Douglas J. Steele" wrote:

> Assuming you want this change made permanently, you could use an Update
> query along the lines of:
>
> UPDATE MyTable
> SET MyField = Left([MyField], 3) & " " & Mid([MyField], 4)
> WHERE Mid([MyField], 4) <> " "
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Mark909" <(E-Mail Removed)> wrote in message
> news:BF205035-2535-4CDB-86E1-(E-Mail Removed)...
> >I have received some data with postcode information.
> >
> > However there has been an error with data entry so half the postcode
> > information had a space between the first 3 alphanumerics and the other
> > half
> > dont have a space.
> >
> > i.e half have been entered as NH116BZ
> >
> > the other half have been entered as NH12 8NZ
> >
> > Is there a way I can alter the text in the column so that all the data
> > will
> > be displayed with a space in the centre?

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Altering Paste Data Suzanne Microsoft Excel Programming 2 13th May 2010 07:16 PM
Altering data within columns 2 Mark909 Microsoft Access 1 12th Nov 2008 04:25 PM
help with vba altering access data Hootyman Microsoft Access VBA Modules 1 12th Oct 2008 08:10 PM
Altering data and new values =?Utf-8?B?S2l0dGVu?= Microsoft Access 1 20th Apr 2007 06:41 AM
access altering data? =?Utf-8?B?ZGJlbm5ldHQ=?= Microsoft Access Forms 3 10th Aug 2006 06:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:03 AM.