Trim function - Oracle Enterprise

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
arun_im4u
Premium Member
Premium Member
Posts: 104
Joined: Mon Nov 08, 2004 8:42 am

Trim function - Oracle Enterprise

Post by arun_im4u »

Hi,

How can I trim the columns in a user defined sql via Oracle enterprise stage?? I tried using Trim(column_name) in my user-defined sql and it did not work.

Do I have to use a transformer to trim fields??

Thanks,
AR.
calyan
Participant
Posts: 1
Joined: Tue Oct 18, 2005 2:54 pm

Re: Trim function - Oracle Enterprise

Post by calyan »

arun_im4u wrote:Hi,

How can I trim the columns in a user defined sql via Oracle enterprise stage?? I tried using Trim(column_name) in my user-defined sql and it did not work.

Do I have to use a transformer to trim fields??

Thanks,
AR.
you can use Trim in both Transformer and OCI enterprise stage.
arun_im4u
Premium Member
Premium Member
Posts: 104
Joined: Mon Nov 08, 2004 8:42 am

Post by arun_im4u »

I used

select trim(column name) from table in a user-defined sql from my oracle enterprise stage and it did not work.

Gave me this error: Lookup_12: Error when checking operator: Key field "column name" not found in input schema
main_program: Could not check all operators because of previous error(s)

If i take the trim off then it works?? The datatype is char.

Any suggestions.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try Rtrim()
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply