Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Numeric Object to Char Object

Status
Not open for further replies.

langgang

Programmer
Oct 6, 2003
5
US
Designing my universe I want to add an object which is the character equivolent of a numeric object. In the database it is a number, but I want to create a character object in my universe from it. How do I do that?
 
I discovered the answer to my own question! By making an object that is a character and using the function format(<numeric field>) I get the character equivolent of the numeric value. By adding a right('00'+format(<fieldname>),2) I ensure I get two characters regardless of the size of the number.
 
May I add to this: Depending on which RDBMS you are working with there is a batch of functions avalable with amongst others conversion functions. You may not need them right now , but some can be a real benefit in creating smart universe objects!!

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top