Page 1 of 1

replacing '*' with empty string

Posted: Thu Dec 20, 2007 11:31 am
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

Posted: Thu Dec 20, 2007 3:12 pm
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.

Posted: Thu Dec 20, 2007 6:11 pm
by dsdev_123
Thanks Ray that solved my problem

Posted: Thu Dec 20, 2007 7:47 pm
by ray.wurlod
Perchance you might mark the thread as Resolved, then?