PL/SQL (MOSC)

MOSC Banner

Space delimited negative value with leading zeros

edited Mar 17, 2010 4:11AM in PL/SQL (MOSC) 5 commentsAnswered ✓
I am trying to create a space delimited file for a SAP labor import.  The hours field needs to be defined as XXXX.XX, so a total of 7 spaces.  I run into problems when the value is negative.  The field also has to be zero filled.  For example, a positive value of 40 and half hours is "0040.50" so everything works good.   But, a negative value of 40.5 displays as "-0040.5" and should display as "-040.50".  My select for this looks like: trim(to_char(hours,'FM0000.00')).  Any ideas would be appreciated.

Chad

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center