Our data in database contain Chinese characters, you know, one Chinese character contain 2 bytes, and we want to format selected field to 5 bytes length. I think I need some function like "LeftB" in Teradata to get charaters out by bytes. If we can have some function like "LeftB", another question is for how to avoid half split a Chinese character. At the end of string, if we split the Chinese character we will have un-readable character at the end. At this situation, we'd like to cut 1 more byte to cut the whole chinese character out, and link a blank at the end.
The backgroud is : The data store in our system, and the database is Teradata, we need to use SQL extract data out and generate a text file as a interface file with other system, this "other" system is not under our control, and we must follow strict file format provided by "other" syterm's vendor. Each field in the interface file must has fixed width.