replacing '*' with empty string

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsdev_123
Participant
Posts: 25
Joined: Tue Oct 09, 2007 9:13 pm

replacing '*' with empty string

Post by dsdev_123 »

hi

i have a requirement where i am extracting the data from fixedwidth flat file and loading the data to the database after doing some transformations. the file contains some '*' values. so while loading the data to the database i need to make sure that whenever there is * in the text field i need to replace with empty string. Is there any specific function to deal with this. any Help would be really appreciated.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Convert("*", "", InLink.TheColumn)
Beware that not all databases (particularly Oracle) like receiving "" and will convert the same to NULL.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsdev_123
Participant
Posts: 25
Joined: Tue Oct 09, 2007 9:13 pm

Post by dsdev_123 »

Thanks Ray that solved my problem
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perchance you might mark the thread as Resolved, then?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply