Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

Change format of Data.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
boomtap - 26 May 2006 17:29 GMT
I have about 12000 records that need to be changed from the format:
830 to 8-3
2710 to 27-1
Is there a command I could use to do that?
Thanks,
MIke
KARL DEWEY - 26 May 2006 17:52 GMT
[XX] is your field.   I am assuming that you want to drop the right most
character and insert a dash between the left digits and penultimate character.
Left([XX],Len([XX])-2) & "-" & Left(Right([XX],2),1)

> I have about 12000 records that need to be changed from the format:
> 830 to 8-3
> 2710 to 27-1
> Is there a command I could use to do that?
> Thanks,
> MIke
boomtap - 26 May 2006 21:03 GMT
That worked amazingly well - I can't thank you enough.

>[XX] is your field.   I am assuming that you want to drop the right most
>character and insert a dash between the left digits and penultimate character.
[quoted text clipped - 6 lines]
>> Thanks,
>> MIke
Rick B - 26 May 2006 17:55 GMT
I don't understand.  You have a field with an entry of "830" and you want
that to turn into "8-3"?

You also have an entry of "2710" that you want to turn into "27-1"?

I don't see the pattern here.  Are you simply dropping any zeros, then
inserting a dash before the last digit?  Is this a text field or a number
field?  Do you want the new value to replace what is currently in the table,
or are you simply trying to output this in a query or a report?

Signature

Rick B

>I have about 12000 records that need to be changed from the format:
> 830 to 8-3
> 2710 to 27-1
> Is there a command I could use to do that?
> Thanks,
> MIke
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.