special character oddity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 51
- Joined: Mon Feb 05, 2007 1:53 pm
special character oddity
In my transformation I am hard coding a ORIGINAL_DATA_SOURCE and then sending the rows into the final staging dimension table through an insert or update. The initial insert works fine but I noticed the ORIGINAL_DATA_SOURCE included three spaces not established in the transformation. When testing updates it rejects all update cases and sends the bad rows to an error table. In this table I see the ORIGINAL_DATA_SOURCE with three special character (boxes) after the ORIGINAL_DATA_SOURCE. I have tried the below derivations. TRIM('DMD' : TRIM(pEnv)) where pEnv is the environment variable in this case it was DMED. TRIM('DMD' : pEnv) TRIM ('DMD' : SpaceWhiteSpace(pEnv)) I set up a variable for DMD and tried pDataSrc : pEnv. I tried hardcoding it to 'DMDDMED' etc... The only way i got it to work is if i used up all the characters in the field 'DMDDMEDDDD' so that the spaces disappeared. All the other fields in the transformer came into the table with no trailing spaces except the one I am discussing. Any thoughts?
Sounds like you're moving less than the number of characters defined into a character field. If a character column is say, 10 characters, and you move 5 characters into that field, what would you expect to be in the rest of the field? Probably your default fill character, usually a null '\0' or blank.
Change the data type to varchar, and your problem should go away.
Change the data type to varchar, and your problem should go away.
Ande
"So, you think this will work?"
"So, you think this will work?"
-
- Participant
- Posts: 51
- Joined: Mon Feb 05, 2007 1:53 pm
That's why I asked the datatype. Arrrgghh! CHAR strikes again!!travissolt wrote:Didn't even think it could be a data type issue but it is a Char so thanks. i will change it to varchar2 and give it a go.
![Laughing :lol:](./images/smilies/icon_lol.gif)
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 51
- Joined: Mon Feb 05, 2007 1:53 pm