Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter Table, reduce Field Size

Status
Not open for further replies.

isorders

IS-IT--Management
Dec 6, 2001
102
0
0
US
I know I can alter table to increase a char(10) to char(20), but is there a way to go the otherway and reduce the field size as long as the data in the field still meets the new char size?
Thanks
 
Hi,
Not sure why you would want to do this. Char string space only uses what it needs in Access. Even if you had a field with the length of 255 and you had only one record with a three letter word you would only use 3 chrs for that record. Access is not a fixed database like db2. But, if you really need to do this then you need to find out the max length of any word (don’t forget to TRIM the blanks). Then after you know this value then you can resize the field. It would be a two step process.

John


*********************
John Nyhart
*********************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top