Transformer , IF condition
Posted: Thu Jan 28, 2010 6:52 am
Hi,
I have a file which has two field.
report_code integer 10
report_name varchar(255)
field_value varchar(255)
sequential file
Transformer
will trasfer it to a sequential file based on some logic.
if report_code = 59 then i have to store the value in date column. Because it has datetime value.
if report_code = 60 then i have to store the value in rank column.
So i include like
if (DS4Link.report_code <> 59 or DS4Link.report_code <> 60 )then DS6Link.field_value else 0
this is for field_value
if (DS4Link.report_code = 59 then DS6Link.field_value else 0
this for date column
if (DS4Link.report_code = 60 then DS6Link.field_value else 0
this is for rank column
But the value are not going as expected.
sequential file:
report_code integer 10
report_name varchar 255
field_value numeric 18,8
date timestamp 23 3
rank varchar(5)
I have a file which has two field.
report_code integer 10
report_name varchar(255)
field_value varchar(255)
sequential file
Transformer
will trasfer it to a sequential file based on some logic.
if report_code = 59 then i have to store the value in date column. Because it has datetime value.
if report_code = 60 then i have to store the value in rank column.
So i include like
if (DS4Link.report_code <> 59 or DS4Link.report_code <> 60 )then DS6Link.field_value else 0
this is for field_value
if (DS4Link.report_code = 59 then DS6Link.field_value else 0
this for date column
if (DS4Link.report_code = 60 then DS6Link.field_value else 0
this is for rank column
But the value are not going as expected.
sequential file:
report_code integer 10
report_name varchar 255
field_value numeric 18,8
date timestamp 23 3
rank varchar(5)