Link to home
Start Free TrialLog in
Avatar of CLSTEAM
CLSTEAM

asked on

NEED TO TRIM AN ENTIRE TABLE.

Hi there I have serveral tables that come from a SQL server.  When the tables are linked to Access most of the fields have spaces before and after the data.  In each table there is just too many fields to use the trim([field name]) on all of them.  Is there a function that can update all the fields at once?  Also is there a way that when the SQL tables are import or linked that the fields are automatically trimmed without having to do this if the trim all fields is not available.  Thank you so much.
Avatar of jerryb30
jerryb30
Flag of United States of America image

If you have imported the tables into Access, it would be fairly simple to write a function to trim existing data in existing fierlds in all tables.  Do not know if this is do-able (or wise) for data in tables in the SQL Server db.  


Avatar of Lucas
If you want to remove the spaces, you have to change the data type on the SQL server side.  I'm not sure what it is, but it might by nVarChar or VarChar.  

I have the same problem, but it shouldn't matter when you generate queries otherwise you'll have to use the TRIM function in your query.
Avatar of CLSTEAM
CLSTEAM

ASKER

Ok I understand but is there a function that does a Trim([Table*])  

If I do this then I get a message that you cannot update using *

I think that it is a great tool but having to do each one, one by one by one!

ASKER CERTIFIED SOLUTION
Avatar of jerryb30
jerryb30
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CLSTEAM

ASKER

Ok - just wanted to see if I was missing something.  Thanks so much.