A frequent problem with data migrations is text data with illegal characters in it. For example, the GoldMine notes fields sometimes contains NULL characters (binary 0), which can be problematic when inserting the data into SQL Server.
Inaport provides the snip() function, which can be used to remove characters or strings from a field. For example:
will remove the "1" characters from the string, returning "aabb".
The characters to be snipped can be built from a regular expression. In particular, \xNN allows you to specify the binary value of any character. Examples:
Code:
\x00 - NULL
\x0A - Carriage Return
\x0D - Line Feed
So to snip the NULL character from a field, do:
If you need to remove a range of characters, use the regular expression "[]" construct, which allows you to specify a set or range of characters:
Code:
[\x00\x02] - specifes the characters \x00 and \x02
[\x00-\x08] - specifies all characters between \x00 and \x08
So to snip a range of characters fro the field, do:
Code:
snip(#myField, "[\x00-\x08]+")