[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Number to Character



Hi,

You can perform this through oracle sql.

select lpad(to_char(<Number>),3,'0') from dual

Substitute the number and run the query. 


Thanks,
Vijayakumar.J
Desk:469-229-7465

-----Original Message-----
From: sqr-users-bounces+vijayakumar.janakiraman=cingular.com@sqrug.org
[mailto:sqr-users-bounces+vijayakumar.janakiraman=cingular.com@sqrug.org
] On Behalf Of Don Duwe
Sent: Wednesday, October 04, 2006 10:11 AM
To: SQR USERS
Subject: RE: [sqr-users] Number to Character

MOVE ?? TO $?? 999

-----Original Message-----
From: sqr-users-bounces+dduwe=nookind.com@sqrug.org
[mailto:sqr-users-bounces+dduwe=nookind.com@sqrug.org]On Behalf Of
PeterG Clark
Sent: Wednesday, October 04, 2006 10:58 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Number to Character


Hi folks,

Normally, this would be the sort of thing I would like to play with
until I got it working, but I am pressed for time and turning to the
tremendous knowledge base on this list :-)

I have a Number(25) field on a table (Oracle) that I know will never
contain more than three significant digits (i.e. 999) and I need to get
it into a 3 character field on a flatfile ... i.e. if the column
contains 7, I need to put 007 in the flatfile field, if it contains 29,
I need 029 to be in the flatfile field, 0 needs to be 000, 567 needs to
be 567, etc.

Anything I've tried with edits, to_char's, pads and trims isn't working
...
or at least I am not hitting the right combination.

Thanks in advance.




_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users