Page 1 of 1

DATA TYPE ISSUE

Posted: Thu May 08, 2008 12:28 am
by karry450
Hi Friends,


I am having two fields A(TIMESTAMP) and B(TIMESTAMP) in source and and in target I have column C( A-B) which data type should I mention here, if the column C is Decimal it is giving me a phantom error.

can anyone gimme a solution to fit this condition.


Thanks & regards
Karthik Chandra goutam

Posted: Thu May 08, 2008 12:50 am
by ray.wurlod
There are no data types in server jobs, therefore an attempt to subtract two timestamps is undefined. You need to convert them to some numeric format (for example seconds) and subtract those. In what units should C be?

Posted: Thu May 08, 2008 12:55 am
by karry450
ray.wurlod wrote:There are no data types in server jobs, therefore an attempt to subtract two timestamps is undefined. You need to convert them to some numeric format (for example seconds) and subtract those. In wha ...


Can we do subraction of two DATE Data Type in server jobs?

can anyone help me...

Posted: Thu May 08, 2008 12:59 am
by ray.wurlod
No. As I stated earlier there are no data types. You need to convert to the appropriate numeric units (for example days or seconds) and subtract those.

Posted: Thu May 08, 2008 1:33 am
by kimbal
Hi..
we can convert A-data type to iconv and do the same for B also.after that we can subtarct the things.then finaly we can convert to oconv.i think it will solve your problem.kindly put your commands.

Regards
kimbal

Posted: Thu May 08, 2008 3:09 am
by muruganr117
kimbal wrote:Hi..
we can convert A-data type to iconv and do the same for B also.after that we can subtarct the things.then finaly we can convert to oconv.i think it will solve your problem.kindly put your commands.

Regards
kimbal
Hi Kimbal,

Sound the same as Ray, it is how we handle,

Iconv(DATE1[1, 8], "D") - Iconv(DATE2[1, 8], "D") will give u diff btw dates, not TIMESTAMP, this can be edited and used. refer Iconv functions

regards

Posted: Thu May 08, 2008 3:56 am
by tsn
You can use this following in the derivation side

oconv(iconv(DSLink2.a,"MTS")- iconv(DSLink2.b,"MTS"),"MTS")

for example, A-11:20:30 and B-11:20:20 then C will be 00:00:10

you can has the target as sequential file. It can be stored as timestamp. try this and pass on your comments.

tks and cheers,
TSN