Pb utilisation StringToDecimal fonction

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bosley
Participant
Posts: 2
Joined: Wed Jan 24, 2007 9:28 am

Pb utilisation StringToDecimal fonction

Post by bosley »

J'ai besoin de convertir dans une variable d'un stage Transformer un champs "varchar" en "decimal". Je pensais utiliser la fonction "StringToDecimal" mais Datastage ne la reconnait pas, elle apparait en rouge ! :cry:
Quelqu'un utilise cette fonction et peut me donner des infos ? :D
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

La fonction "StringToDecimal" n'existe pas dans DataStage Serveur, juste en PX.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

(best to stick in English in this forum)

In Server jobs the conversion from a string to a decimal can be done differently. There are really no explicit data types and if you have a string that you wish to treat as a number you can just use it in a numeric function and let DataStage do an implicit conversion for you. This implicit conversion works very well but can cause problems if the number cannot be converted, i.e. "123:4". In that case you can use one of the options with the ICONV or FMT functions.
Post Reply