RIGHT/LEFT Justify
Moderators: chulett, rschirm, roy
RIGHT/LEFT Justify
When I view the records in the database through datastage it seems all the fields are left justified...how could I left Justify non numeric fields and Right justify numeric fields....I used the FMT Function but I dont think I am doing it right ... Pls advice
I want the fields to be stored in the database as right justified...how do i accomplish that throuhg datastage
ArndW wrote:You threw me off with FMT reference, since that isn't applicable to "view data". You cannot right justify in that window, the only formatting DS really uses is the field width to presize the display w ...
You don't have to do anything special in Datastage. Check in your database using an appropriate tool to confirm.cosec wrote:I want the fields to be stored in the database as right justified...how do i accomplish that throuhg datastage
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
Um... why?cosec wrote:I want the fields to be stored in the database as right justified...
![Confused :?](./images/smilies/icon_confused.gif)
One generally doesn't worry about 'justification' inside a database. Perhaps if we were talking about a flat file with specific requirements on string fields, but since we're not...
You need to do this or just want to do this? What field datatypes are we talking about here? Unless for some odd reason you've been given explicit requirements to right justify string fields, doing so could just screw up any process using that data that's not expecting it to be stored like that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Numbers cannot be stored justified. If you want a string to be stored "right justified" then you need to explicitly pad the string with spaces on the left. Note that some datatypes such as VarChar2 will strip those leading spaces out of the string! Justification is never a data value issue, just a display method.
Craig - oops, I didn't notice your post until after I had submitted mine. Sorry for duplicating the content.
Craig - oops, I didn't notice your post until after I had submitted mine. Sorry for duplicating the content.