Page 1 of 1

Date comparision (greater than or less than)

Posted: Wed Feb 13, 2013 8:12 pm
by pavan_test
Hi All,

I have source datatype from oracle as 'date'. I am reading this as timestamp.

I have another source from different table with datatype as 'date' and i am reading this as timestamp.

in ETL transformer, I am using timestamptodate function to convert them to date.

I am trying to achieve this in ETL, if a > b and a<=c then output 'true'

after i use TimestampToDate function i find these values in peek stage for a,b,c

a= 2006-03-24
b=2004-06-07
c=2007-05-24

when i try this in transformer a > b and a<=c, i get null in the output. can someone please suggest. Thanks You.
can

Posted: Thu Feb 14, 2013 1:20 am
by srinivas.nettalam
Where are you writing this derivation? What is the datatype of the field/variable where you are writing this expression?

Posted: Thu Feb 14, 2013 8:13 am
by bob7027
change the data type for all fields to timestamp & check with 'isvalid' condition for 'timestamp', then you can write if then else condition

thx

Re: Date comparision (greater than or less than)

Posted: Thu Feb 14, 2013 12:18 pm
by 123gopal
could be Use Oconv() and ICONV() fuctions after compare that

Re: Date comparision (greater than or less than)

Posted: Thu Feb 14, 2013 4:00 pm
by ray.wurlod
123gopal wrote:could be Use Oconv() and ICONV() fuctions after compare that
In a parallel job?
After?!!

Re: Date comparision (greater than or less than)

Posted: Fri Feb 15, 2013 11:11 am
by 123gopal
use the functions ICONV() and OCONV() instead of using timestamp to date in parallel job

Posted: Fri Feb 15, 2013 12:57 pm
by jwiles
123gopal: To echo Ray's question, why? ICONV and OCONV would require the use of a BASIC transformer, potentially affecting performance if this parallel job.

Pavan, can you provide the actual derivations you have written?

Regards,