convert strings to numeric values

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

convert strings to numeric values

Post by admin »

Is there a function in datastage to convert a string to a valid number. eg.

"123456789" -> 123456789

I know of num but that function only returns true(1) or false(0) if the string is not a number.

Regards
Pieter Brundyn

Customer Oriented Applications Division (Comparex Africa COA)
For: Comparex Africa (Pty) Ltd
Company Registration number: 1993/003683/07
Tel: +27 (0)21 550 3427
Fax:+27 (0)21 550 3455
email: pieterb@comparexafrica.co.za

NOTICE:
This message and any attachments are confidential and intended solely for the addressee. If you have received this message in error, please notify Pieter Brundyn at Comparex Africa (Pty) Ltd immediately, telephone number +27 (0) 21 550 3427. Any unauthorised use, alteration or dissemination is prohibited. Comparex Africa (Pty) Ltd accepts no liability whatsoever for any loss whether it be direct, indirect or consequential, arising from information made available and actions resulting there from.


NOTICE:

This message contains privileged and confidential information intended
only for the person or entity to which it is addressed.

Any review, retransmission, dissemination, copy or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient, is prohibited.

If you received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and thereafter delete the material from any computer.

The New Africa Capital Group, its subsidiaries or associates do not accept liability for any personal views expressed in this message.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

You could try:

"123456789" + 0

-----Original Message-----
From: Brundyn, Pieter [mailto:pbrundyn@metropolitan.co.za]
Sent: Thursday, 11 October 2001 5:30 PM
To: datastage-users@oliver.com
Subject: convert strings to numeric values

Is there a function in datastage to convert a string to a valid number. eg.

"123456789" -> 123456789

I know of num but that function only returns true(1) or false(0) if the string is not a number.

Regards
Pieter Brundyn

Customer Oriented Applications Division (Comparex Africa COA)
For: Comparex Africa (Pty) Ltd
Company Registration number: 1993/003683/07
Tel: +27 (0)21 550 3427
Fax:+27 (0)21 550 3455
email: pieterb@comparexafrica.co.za

NOTICE:
This message and any attachments are confidential and intended solely for the addressee. If you have received this message in error, please notify Pieter Brundyn at Comparex Africa (Pty) Ltd immediately, telephone number
+27 (0) 21 550 3427. Any unauthorised use, alteration or dissemination
+is
prohibited. Comparex Africa (Pty) Ltd accepts no liability whatsoever for any loss whether it be direct, indirect or consequential, arising from information made available and actions resulting there from.


NOTICE:

This message contains privileged and confidential information intended only for the person or entity to which it is addressed.

Any review, retransmission, dissemination, copy or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient, is prohibited.

If you received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and thereafter delete the material from any computer.

The New Africa Capital Group, its subsidiaries or associates do not accept liability for any personal views expressed in this message.
Locked