Cutting minus sign in char if exists

Hi
I need a help with sql.
I need to convert final_price kolumn value from number to char in format '0000000000' (10 digits).
Sometimes it contains minus, so what I need to do i need to cut minus, leave value and and fill rest with values.
Example1
BEFORE: 23
AFTER: 0000000023
Example2
BEFORE:-23
AFTER: 0000000023
I wrote :
(ltrim(to_char((final_price),'0999999999'))) as final_price
But minus stays and shows before this 10 digits (-0000000023). What is the easiest way to solve this problem (is it necessary to use decode function ? )
Kind regards
Kris

Hi,
The - that appears is not a digit, but sign. Anyhow, for achieving your expected result, you need to check for the - sign in the first character and adjust your format accordingly?
Something like
select case
     when substr(to_char(-23),1,1)='-' then
          to_char(-23,'099999999')
     else
          to_char(-23,'0999999999')
     end
from dual
/-Arun

Similar Messages

  • Minus Sign in front

    Hello all,
    I have a requirement where in I need to bring the minus sign in front for the amount field in ALV Grid Display.
    I used the FM CLOI_PUT_SIGN_IN_FRONT, but after I pass back the values, the sign gets set at the end. Moreover, I cannot create a character filed because the business might want to do sum on it.
    Please advice.
    Regards,
    Salil
    P.S. the below piece of code
    DATA : gv_bill_rev  TYPE string,
             gv_balance   TYPE string.
      LOOP AT gt_master INTO gs_master.
        gv_bill_rev = gs_master-bill_rev.
        gv_balance  = gs_master-balance.
        CLEAR : gs_master-bill_rev,gs_master-balance.
        CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
          CHANGING
            value = gv_bill_rev.
        CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
          CHANGING
            value = gv_balance.
        MOVE : gv_bill_rev TO gs_master-bill_rev,
               gv_balance  TO gs_master-balance.
        MODIFY gt_master FROM gs_master INDEX sy-tabix
                                        TRANSPORTING bill_rev balance.

    You can directly specify an edit mask for output.
    Field EDIT_MASK in the field catalog is a 60 character field in which you can specify an edit mask.
    fieldcat-edit_mask = 'V___.__'
    The V at the left indicates that you want the sign to appear at the left.  The _ will be replaced by the values of the number.  Put as many underscores as required.  You may also want to specify commas (,), if desired, for thousand's separators and a period (.) for the decimal point, if needed.
    Alterntively, if an appropriate conversion exit exists to put the sign in front, you can assign the conversion exit in the field catalog table.
    Field CONVEXIT in the field catalog can be used to specify the name of the conversion exit.
    Brian
    Edited by: Brian Sammond on Jan 27, 2009 8:08 PM
    Simplfy example edit mask because forum was displaying it funny

  • Minus sign in currency field.

    Hi ,
    I want to insert minus (-)sign before mine currency field.
    i know that i have to convert currency to char field.
    but how.
    and also how to check that field is negative or not.
    please help

    there is a function module
    <b>CLOI_PUT_SIGN_IN_FRONT</b>
    this may help u

  • Changing Minus sign to brackets in smartforms

    Hi Gurus.
    I would like to ask if there is a way to change the minus sign of a type int variabel into brackets.
    for example in smartforms,
    the value is   "900-"
    and i want to show it as (900).
    is there any mask provided in the smartforms?
    thx & rgds,
    William Prawira

    write a simple logic before printing this value
    define charater variable in global
    data : v_string type char20.
    in program line.
    data : v_value1 type i,
             v_str(20) type char.
    if v_value <= 0.
    v_value1 = v_value.
    v_str = v_value1.
    concatenate '('  v_str ')' into v_string.
    endif.
    in text node you can print this v_string.
    OR ELSE
    create a Alternate Node.
    in general tab create condition like
    filed < = 0.
    In true place text node
    place brackets before and after of variable
    In false place a text node
    as it is variable
    Edited by: murali papana on Sep 15, 2008 12:46 AM

  • Display of minus sign

    Well I want to display minus sign in front of credit amount.
    though i have multiplied the amount by -1. it shows the minus sign after the amount. i want to display it before the amount. is there any function for it.
    i'm making a classical report using se38.

    Hi ,
    execute the code and check the output.
    data : val1 like vbap-netpr.
    val1 = '12345.21'.
    val1 = val1 * -1.         "ur value
    write:/ val1.               " negative at the end
    data : val(13) type c.   " declare a char variable
    move val1 to val.        
    write:/'Still', val.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
      CHANGING
        value         = val.          "sign is put ot front.
    write:/'Now', val.
    regards,
    vijay

  • This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    My current Apple ID, for which all of my content has been downoaded (e.g., music, apps) is associated with a work email address that I will no longer have access to in the near future.  In my Apple ID account, I noticed I had two alternate emails listed, one is my .me account and the other is my .gmail account.  I use my .gmail account, and it is the primary email I use with friends and family.  I noticed both were not verified, and when I tried to, it said they were both associated with other accounts.  I was able to log into a separate Apple ID account I must have set up at tone point with my .gmail, and I changed the email address to a new one I created.  I also deleted the gmail account from any other Apple-relted account I could think of.  I am still gettgin the same error message when I try to add it to my current Apple ID: "This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID."
    My concern is this: with FaceTime and now iMessage, it seems more important than ever that I am able to use my correct email address.  With iOS5 beta, I cannot enter either my .gmail or.me accounts under "You can be reached for messages at:" as I get an error stating: Unable to verify email because it is already in use."
    How can I remedy this issue and assign my .gmail account to my Apple ID?

    Re: Cant verify Apple ID
    created by kelly218 in iTunes Store - View the full discussion
    I just spoke with a technician at Apple.  I hsven't been able to verify because the wife has the phone.  but he said all that you need to do is:
    1) Go to Settings --> iTunes Store and login with your Apple ID and pwd
    2) Go to Settings --> iCloud and login with your Apple ID and pwd
    seems that the phone requires you to login to the store first...

  • I transferred data from my external hard drive to my restored Mac Book Pro via migration assistant and now my external hard drive in time capsule has red minus signs. How do I get rid of that without getting rid of any of my data?

    I used Migration Assistant to transfer my data from my external hard drive via Time Capsule to my restored Mac Book Pro. When I now go into Time Capsule I there are red minus signs in the corner of all the folders that are contained in my back up. How do I get rid of this and access my previous back-ups?

    Select the drive and Finder > Get info and at the bottom "ignore permissions on this volume"
    You can copy the files, but the ownership on the files still belongs to the other user account, once your done copying, then perform a #6 Reset Users Permissions and that will set all the ownership to that account.
    ..Step by Step to fix your Mac
    Another method is to copy the entire folder, then change it's permissions.

  • I increased my font with zoom for the first time & got it too large. It will not decrease using Control & minus sign.

    I use Firefox 4. Windows XP. I have tremors & must have accidentally clicked on something that made it open up with weird colors like it was in safe mode. It was in 8-bit so put it back on 32-bit and 1280 x 1024 pixels. Then the font was so small it is almost unreadable. Tried to change it in Firefox Tools, Options, & Content. This did not work. I then used Zoom after checking in Help but got the font so large I can't view my email right. It will not decrease when trying Control with the minus sign as suggested.

    Did you change the resolution in Control Panel > Display ?
    What is the native resolution of your video display (monitor)?

  • HT5137 I updated to ios7.0.2, when I double click on home button it brings up an app list but when I hold my finger on an icon it won't show any with a minus sign, is it no longer necessary to close apps?

    In ios 7.0.2, when you double click the home button it brings up the icons but won't allow you to show them with minus signs, is it no longer necessary to do this?

    jim96776 wrote:
    is it no longer necessary to do this?
    It was never necessary except in certain unusual circumstances.

  • How to delete old account, I can't log in due to - This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID.

    How to delete old account, I can't log in due to error - This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID.

    All good, I loved with AppStore and now everything seems to be back to normal.

  • Why can I not verify my Apple ID? I keep getting this message after trying: "the email address is alread in use or you may already have an apple id associated with this email address. please try again or sign in using your existing apple id"

    the email address is alread in use or you may already have an apple id associated with this email address. please try again or sign in using your existing apple id............ PLEASE HELP ME

    Hi all,
    I tried this and it worked:
    1) Visit My Apple ID at https://appleid.apple.com/.
    2) Click the Manage your account link on the right sideof the page.
    3) Enter the account name (Apple ID) and the password you used when creating the account.
    4) Change the email address associated with your account.
    5) Send new verification email
    I also got this from apple CS for other things to try:
    Please follow these steps to access your Apple ID accountinformation:
    1) Visit My Apple ID at https://appleid.apple.com/.
    2) Click the Manage your account link on the right sideof the page.
    3) Enter the account name (Apple ID) and the password youused when creating the account.
    4) Delete any duplicate email addresses associated withyour account.
    5) Click the Save Changes button.
    If you do not have duplicate email addresses on your account, it is possible that your email address is already being used withanother Apple ID. In order to verify your email address with the current AppleID, it will need to be disassociated from your other Apple ID. You can do thatby following these steps:
    1) Visit My Apple ID at https://appleid.apple.com/.
    2) Log in with your other Apple ID and password.
    3) Select the Manage your account link.
    4) Choose Name, ID, and Email Address from the left sideof the page.
    5) Next to Primary Email Address, select Edit so that youcan change the email address associated with this Apple ID.
    6) Once you've made the desired change, select SaveChanges.
    7) Choose Sign Out from the top right of the page.
    If you would like to have the verification email resentto you, please sign into https://appleid.apple.com/with the Apple ID you want to verify, and make sure there is not a typo in yourPrimary Email Address. Select the "Edit" link to the right of your email address to make corrections and then click the "Save Changes" button.Once the typo is fixed, or if there is no typo, click the "Resend"link under your email address.
    If you still do not receive the verification email,please reply to this email with the email address that you intend to use onyour Apple ID.
    Good luck!
    Em

  • When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    Me too. I try to verify and i get the same message.
    I've created 3 alternate e-mail addresses and tried creating new accounts.
    Same Result!
    This is bullsh!t. How the **** can all 4 of my attempts result in the same freakin error???

  • This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID.

    I want to change my apple id but get the message "This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID.".  I try to log a call with apple support and I get a message like "cannot schedule a call".  That leaves me out of options.  Any ideas?

    Hi billfromwandering,
    I'm sorry to hear you are having these issues changing your Apple ID. It is correct that if an email address has been used previously for an Apple ID, it can not be used for a different Apple ID, as noted in this article:
    In most cases, your Apple ID is also the primary email address of your Apple ID account. You can change your Apple ID to any other email address you control, as long as it's not already in use as an Apple ID. If your email address ends with @icloud.com, @me.com, or @mac.com, it's already an Apple ID. 
    Change your Apple ID - Apple Support
    If you are certain that the email in question has never been used for an Apple ID and you are having issues contacting Apple Support regarding this issue, you may want to make sure you are going through the Apple ID support channel on the following page:
    Apple ID - Contact - Apple Support
    Regards,
    - Brenden

  • How to reactive my iphone 5 s iCloud account however it sign up in un exist email address

    how to reactive my iphone 5 s iCloud account however it sign up in un exist email address whish i cant log on to reset the password.
    i update my iphone after that i fase that iusse so is there any one can help me with that

    You will need to visit appleid.apple.com to manage your Apple ID. From there, you can log in with your existing credentials and then change your registered email addresses.
    This is also where you can update your physical address, phone number, security questions, etc.
    Hope this helps!

  • Iphone 5 - can't delete albums in the albums no minus sign when in edit

    I need to free up storage on my Iphone 5...when I am in ALBUMS ...I chose EDIT and NO MINUS sign appears to the left.  I have old photo albums from a blackberry torch and photos from various camers got loaded up I am guessing through Itunes on a PC that no longer works.  I do not want these photos on my phone I have them stored on a external drive.  I love my phone I just don't want all these darn photos taking up so much room.  What the heck can I do??? ahhh! HELP

    You need a 3rd party iPhone file browser such as TouchCopy. See: https://discussions.apple.com/docs/DOC-3141. This covers more than photos, but it should still be useful.
    Note, however, that if the photos were taken with a higher resolution camera than the iPhones the images that you copy back to your computer will be lower quality than the originals, as images in the Photo app are optimized for the iPhone's screen.

Maybe you are looking for

  • Can't open INDD file from icon

    I have an installation of InDesign CS3 (upgraded from CS2) that won't let the user open a file from it's icon. You get the error message of "<filename> is not a valid win32 application"   The file will open if you open InDesign and use the file open

  • Resize javascript debugger window in acrobat

    I feel stupid.  I am trying to learn adobe javascripting.  I am following Adobe's web tutorial.(The tutorial screen shots have nice big windows.)  However the console window only shows 40 characters to a line.  On this debug window, there is no resiz

  • Sent Emails Moved to Undeliverable Folder

    I'm experiencing a problem with CF7 occasionally moving into the Undelivered folder emails that were actually sent (and received). I have a scheduled task that hourly moves files from the Undelivered folder back into the Spool folder, and this has re

  • Is there any way on an iPad Air to see your dictation as you speak

    Is there any way on an iPad Air to see your dictation as you speak

  • Introspector finds wrong PropertyDescriptors on overriden methods

    Hello all, I've noticed some odd behaviour from Introspector.getBeanInfo(Class). public interface TestB { public class TestBImpl implements TestB { public interface TestA {      public TestB getTestB(); public class TestAImpl implements TestA {