Trim character field in Multiload

Tools
Enthusiast

Trim character field in Multiload

Hello

I am using Multiload to update/insert into a table. All the character fields from my source file are fixed width, and padded with spaces. I would like to trim the spaces from those fields before inserting them into VARCHAR columns in my table. Is there a way I can tell multiload to trim character fields before loading them?

Thanks
Mick
2 REPLIES
Enthusiast

Re: Trim character field in Multiload

Yes, trim the host variables that you are using. Example:

INSERT INTO mytable
(col1
,col1)
VALUES
(TRIM(:col1)
,TRIM(:col2));

Enthusiast

Re: Trim character field in Multiload

Cheers!