Hi All,
My source is a flatfile and target is an OCI,my scenario is I have source column srcCol and corresponding target column TrgCol1
SrcCol1 (Datatype - Char(1)) is moved to column TrgCol1 (Datatype - Char(2))of table .
So srcCol1 should be moved to the first character of column TrgCol1
If I have Data like
srcCol1 -A then the it should populate in Trgcol1 as "A_ " not as "_ A"
I mean source column value should go to the first charcter of the target column not to the second character.
Will The Datastage implicitly take the value in the first character itself or should I need to explicitly put the value only in the first character.
Please suggest
Regards,
Saik
First Character of source to First char of target
Moderators: chulett, rschirm, roy
You are going from CHAR(1) to CHAR(2). Use explicit padding of one space in your derivation. The derivation for TrgCol1 is
Code: Select all
SrcCol1:' '
-
- Premium Member
- Posts: 209
- Joined: Fri Jan 09, 2004 1:14 pm
- Location: Toronto, Canada
- Contact:
Re: First Character of source to First char of target
Saik,
I think this is really more of a display issue in whatever tool is used to access the data in Oracle.
However, if you wish to have the data left justified instead of right justified in the Oracle column, just concatenate a blank to your input column, i.e. TrgCol1 = SrcCol1 : ' '
Hope this helps,
Rob W.
I think this is really more of a display issue in whatever tool is used to access the data in Oracle.
However, if you wish to have the data left justified instead of right justified in the Oracle column, just concatenate a blank to your input column, i.e. TrgCol1 = SrcCol1 : ' '
Hope this helps,
Rob W.
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Toronto, Canada
bartonbishop.com
Isn't that... completely unnecessary? Since when will char fields be right justified? Just map one to the other, no extra who-ha needed.ArndW wrote:You are going from CHAR(1) to CHAR(2). Use explicit padding of one space in your derivation...
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
You are right, in 99% of the cases this is unnecessary as the implicit padding will be right when going to a VarChar from CHAR. But sometimes the default pad character might not be set to space - so in this type of scenario I'd always opt for the explicit method. I am thinking more of PX jobs than server ones at the moment for this padding question, though.