Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

janhess
2012-02-15 12:55:59

I tend to use a string for output and let the database sort it out.

Neil_P
2012-02-15 12:24:41

I tried your suggestion.
I got error

Type mismatch: cannot convert from Object&Serializable&Comparable<?> to Date

janhess
2012-02-15 12:03:38

Have you tried passing an empty value? Not sure if you can do this to a date field.
row1.time.equals("00000000")?"":row1.time

What is the code at the error line?

Neil_P
2012-02-15 11:58:38

Yes.

janhess
2012-02-15 11:20:02

Does your output field allow for nulls?

Neil_P
2012-02-15 11:18:39

Thanks Pedro but that did not help.
I got following error.

Exception in component tMap_4
java.lang.NullPointerException
    at.....


Tried converting row1 to string type but it gives conversion error.

Thanks,
Neil

pedro
2012-02-15 10:25:37

Hi

Say that the column is called time.
Set expression in tMap as follow.

Code:

row1.time.equals("00000000")?null:row1.time

Regards,
Pedro

Neil_P
2012-02-15 10:13:56

Hi,

I am loading text file in to oracle database. Text file contains strings of dates in 'yyyymmdd' format.
I am transferring them into oracle table in 'dd-MM-yyyy' format. This works fine until text file comes across a value(date) '00000000'.
This gets converted to '30-Nov-0002' in Oracle.
Could anyone please help me in formatting the string to get null if string value is '00000000'?

Thanks,
Neil

Board footer

Powered by FluxBB