Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-04-05
2
Medium Priority
?
460 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
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.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

670 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