Select Adpater service

Hi,

is it possible to change the JDBC Type in an selectSQL JDBC Adapter ?
When I select all the column of a particular table in a select adapter service, I get one of the column Type as “NUMBER(11,2)” and JDBC Type as “DECIMAL”. Now the problem is I need to map this field value to another filed of a publishable document. however this field of a publishable doc expects “DOUBLE” as input type and the document is not published if I pass String,decimal,object in it.
Also, if JDBC type is “DECIMAL”, then we have only three options in Output field type :- java.lang.string,java.lang.object,java.math.bigdecimal

Please advise

Regards,
Amit

You cannot change the JDBC type in the adapter service.

I’d suggest having the adapter service return the value as a string. Then you can use WmTransformations package (or something similar) to convert the string to a double to assign to the publishable doc type.

I would STRONGLY ENCOURAGE that the use of double be revisited. For money fields, double can result in inaccurate values. Here is an article on the problems with float and double: [URL]wmusers.com

Generally speaking, strong data typing “in the middle” is not useful. I recommend using string data types in IS doc types and publishable doc types for all fields. The one exception I sometimes make is for date fields where I use java.util.Date. But usually even for date fields I usually use/recommend a string representation and the W3C date/time format.

Thanks reamon for your suggestion. It really helps a lot.