Solved

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

Posted on 2012-04-05
2
446 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
Comment Utility
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
Comment Utility
Awesome Thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
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 shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

762 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

12 Experts available now in Live!

Get 1:1 Help Now