Converting Character to a Number

My source is DB2. The dollar_amount field in the DB2 database is “Character”. How do I convert it in BO in order to use it in calculations?

Thanks,
Kim

__________________________________________________ Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/


Listserv Archives (BOB member since 2002-06-25)

In Designer you can use the integer (int) function to convert a string. In the reporter module use the ToNumber function.

Barbara Rosen
Lead Business Objects Administrator
Global Database Architecture & Engineering Services Salomon Smith Barney
barbara.rosen@ssmb.com


Listserv Archives (BOB member since 2002-06-25)

In a message dated 01-06-13 07:35:16 EDT, you write:

In Designer you can use the integer (int) function to convert a string. In
the reporter module use the ToNumber function.

[ snip ]

My source is DB2. The dollar_amount field in the DB2 database is “Character”. How do I convert it in BO in order to use it in calculations?

If you use integer (the int() function), aren’t you going to lose the “cents” that appear as a decimal? Is there a float() function for floating point?

If you can, I would suggest that you do the conversion in the Universe… that way you do not have to redo the conversion in every single report that uses the dollar amount object. Your DB2 DBA should have a reference on the functions available, or perhaps he or she can just tell you which function should be used.

It’s interesting that a dollar amount is stored as a character string…

Regards,
Dave Rathbun
Integra Solutions
www.islink.com


Listserv Archives (BOB member since 2002-06-25)