[resolved] data trim column while delete

Six Stars

[resolved] data trim column while delete

Hii,
I have a job in which while taking the input from mysql i check the option of trim all string/char columns.
i have a mysql output component where delete is option.
my prob is i have trimmed all the cols so my key column for delete is also trimmed
now when i delete records the key value doesnt match as it has been trimmed.
i can do it by not trimming key column in the input but is there any other workaround for this.
regards,
djugal

Accepted Solutions
One Star

Re: [resolved] data trim column while delete

I've found in those circumstances it is best to do the delete first without any trimming, then do the insert/update using trimming in a second process.

All Replies
One Star

Re: [resolved] data trim column while delete

Hi Djugal
Not trimming key column is the most convenient way.
Regards,
Pedro
Six Stars

Re: [resolved] data trim column while delete

ok thanks,
just curious, if additional columns in additional settings of mysqloutput could be of any help.
regards,
djugal
One Star

Re: [resolved] data trim column while delete

Why would you want to trim it?
One Star

Re: [resolved] data trim column while delete

Hi Djugal
The Additional columns option allows you to call sql functions to perform actions on columns.
In my opinion, it is not appropriate here.
Regards,
Pedro
Six Stars

Re: [resolved] data trim column while delete

@janhess - i want to trim all columns as i am inserting some acceptable data as well as rejecting data which dont meet criteria, all my reject rows are fed to dboutput where rows r deleted, all accepted cols are fed into another dboutput where they are inserted which has to be in trimmed format
@pedro - thanks
regards,
djugal
One Star

Re: [resolved] data trim column while delete

I've found in those circumstances it is best to do the delete first without any trimming, then do the insert/update using trimming in a second process.
Six Stars

Re: [resolved] data trim column while delete

k will try tht thks janhess