Solved

TO_CHAR - Tab in column when converting varchar2 field to currency.

Posted on 2012-04-05
2
447 Views
Last Modified: 2012-06-27
Gurus,

I'm noticing a tab in the column when converting a varchar2 field to currency. I'm using the TO_CHAR function to do this.

Select Distinct to_char(Prsprsc/100/2,0'999.99')
From Kat,Kav,Kvt,pro,art,aez,prs
Where
Kavkatkeyi = Katkeyi And
Artkeyi  = Aezartkeyi And
Prokeyi = Aezprokeyi And
Artkavkeyi = Kavkeyi And
Artkeyi = Prsartkeyi And
prskavkeyi = artkavkeyi and
prokatkeyi = katkeyi and
Kvtkeyi = Kavkvtkeyi And
Katpf7c = 'Jewel' And
(Artvf5c Like '%Deli%' Or Artvf10c Like '%DELI%') And
Prsvf15c = 'lb.' And
Kvtbezc In ('CHGO-78CA','DKLB-78CC','BNRM-78CE')
and artkeyi = 163245;

Returns
prsprsc = '   5.00'

Should Return
prsprsc = '5.00'

 
Seems simple enough but I'm obviously doing something wrong.

Help?
0
Comment
Question by:xbox360dp
2 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 37812984
actually that's a space reserved for the sign in case your number is negative


try this

to_char(Prsprsc/100/2,'fm999.00')
0
 

Author Comment

by:xbox360dp
ID: 37813691
Awesome Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now