Re: Trimming field data
Posted in 1995
Dean,
There's probably a more flashy way to do this, but if you've got ISQL,
use an ACE report to unload the data from the table:
output
report to "datafile"
top margin 0
left margin 0
page length 10000 {make sure this is larger than the number of rows =
returned}
end
format
on every row
print col1 clipped, "|", col2 clipped, "|", col3 clipped, "|", .....
end
Then delete the data from the table, and reload from the file:
delete from tablename;
load from datafile insert into tablename;
The "clipped" keyword in ACE removes any trailing blanks.
Hope this helps,
Richard.
----------------------------------------------------------------- =20
| _ =AF\\ | Richard Thomas |
| \\ 0_ | r.thomas@csl.gov.uk |
| \\ / | |
| oo/ | "20 Regal and a four-pack, |
| / \\ | I guess I'm set for the night" |
| \\_/ | - "TV Tan" The Wildhearts |
-----------------------------------------------------------------
>=20
> Can anybody tell me if there is a way to trim data in an informix=20
> database. I currently have data in a field that has spaces tagged =
onto=20
> the end of it and I would like to remove it.
>=20
> Any ideas would be appreciated.
>=20
>=20
> Dean Hobbs
>=20
>=20
> deanh@unipalm.pipex.com
>=20
>=20