Solved

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

Posted on 2012-04-05
2
454 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 74

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Date 6 41
Oracle perfomance tuneing. 3 47
Dbms_job.change procedure 16 37
Oracle Date add 9 32
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

734 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