You are not logged in.
Database used: Postgres 8.4 / Oracle 10g
I am trying to use tMap component to transform data from boolean type in Postgres to NUM in Oracle (e.g. if column has value false then insert 0)
This is needed as part of Data migration exercise. Some how I did not find way how to do it. I looked through component tConvertType but that does not seem to be helpful either.
Any help on how to achieve this?
Try the following expression on tMap: eg:
I tried the option suggested by you, but this does not work. I have uploaded the screen shot of the same.
The error message coming up after clicking "Test!" button is
"Type mismatch: cannot convert from int to BigDecimal"
Last edited by mahendraps (2010-01-06 10:55:52)
If the data type of output column is BigDecimal, try
row1.columnName==false?new BigDecimal(0) :new BigDecimal(1)
However I am still getting the message "Exception in thread "main" java.lang.Error: Unresolved compilation problems: ".
Does it show the message when you click on 'Test' button? Don't worry, just forget it and I suggest you not to use 'Test' button, it always confuse user eventhough there are not compilation problems in the generated code.