remove records based upon constraint

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
times29
Premium Member
Premium Member
Posts: 202
Joined: Mon Sep 22, 2008 3:47 pm

remove records based upon constraint

Post by times29 »

Hi,
I am trying to remove records from incoming stream in transformer
doing below code as i don't want Agent as output and its not working

(to_transf.STATUS= 'Agent')<>0
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: remove records based upon constraint

Post by MT »

Hi times29

well just look at you logic:
1. you compare if the STATUS field equals AGENT
2. The result shoul not be zero

If you do just number 1, it will work - your logic is kind of doubled this is producing the error
regards

Michael
nayanpatra
Participant
Posts: 41
Joined: Sat Jun 06, 2009 11:13 pm
Location: Kolkata

Post by nayanpatra »

Please try the below logic

Trim(to_transf.STATUS) <> 'Agent'

to restrict the incoming records.
Nayan
times29
Premium Member
Premium Member
Posts: 202
Joined: Mon Sep 22, 2008 3:47 pm

Post by times29 »

Well i tried Trim(to_transf.STATUS) <> 'Agent' too its not working
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Show some actual values from the status column and also tell the data type of the status column.
Choose a job you love, and you will never have to work a day in your life. - Confucius
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Make sure you put that into the constraint and not into an output column derivation. Confirm you have tested that. Otherwise give more details/actual error message.
Choose a job you love, and you will never have to work a day in your life. - Confucius
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

On top of that Try

Trim(UpCase(to_transf.STATUS)) <> 'AGENT'

DS User
Post Reply