Jump to content

Remove Extra White Space & Spaces From Data


stig1

Recommended Posts

When I extract data from the as400 data system, to insert or update into mysql, there is all the extra white space & spaces in the mysql database after insert.

 

For example:

 

These paper bags are made from 100gsm brown kraft paper.|                                                                          They have a card in the bottom of the bag and a paper handle.|                                                                      Size: 320mm (width) x 120mm (gusset) x 460mm (height)|

 

 

Would like it to be inserted or updated in mysql to look like the following:

 

These paper bags are made from 100gsm brown kraft paper.|They have a card in the bottom of the bag and a paper handle.|Size: 320mm (width) x 120mm (gusset) x 460mm (height)|

 

 

Any ideas how I could achieve this, a function would be great as there are many fields like this, so if i can just feed the as400 database field into the function would be perfect.

 

Any help is always apprecaited greatly.

The problem of the source has already been located.

 

Data on an IBM AS400 system, puts in all the extra spaces in lines especially when the AS400 programmer, wants to put data in a text field to display, on his screen, the data will have spaces cause he can't do carriage returns or something. Not going to argue with him.

 

It has to do with characters per line in an as400 system.

 

I can use trim for so many fields, but the one i explained is a text field, and just looks very ugly in my mysql database.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.