Automatically trim a varchar field in an update SQL

We have an ETL application that does an update with a varchar field. When the field contains spaces, we see that with an update these spaces are trimmed automatically. We wonder whether there is a HANA setting that can be set to disable this trim....

For your ETL, Is HANA the source system?
If yes, then you got to change at ETL side right?
Regards,
Krishna Tangudu

Similar Messages

  • HowTo turn off automatic trim for char fields

    I have a CHAR(1) field in the database containing a space. This is mapped to a char field in an entity Bean, but the space will not be loaded. Instead it is automatically trimmed to '', which leads to an exception when converting the char into an Enumeration. Does anyone knows a solution or a work around to turn of this automatic trimming? I can't change the values, so this would not be a solution.
    Greetings,
    Oliver
    Edited by: user11932222 on 23.09.2009 01:48
    Edited by: user11932222 on 23.09.2009 01:49

    You can disable trim of CHAR fields using a SessionCustomizer and setting setShouldTrimStrings(false) on the Session's DatabaseLogin.
    http://www.eclipse.org/eclipselink/api/1.1.2/org/eclipse/persistence/sessions/DatabaseLogin.html#setShouldTrimStrings(boolean)
    There is not currently a JPA persistence.xml property for this, please log a bug for this.
    James : http://www.eclipselink.org

  • Best practice to define length for varchar field of table in sql server

    What is best practice to define length for a varchar field in table
    where field suppose Remarks By Person  varchar(max) or varchar(4000)
    Could it affect on optimization in future????
    experts Reply Must ... 
    Dilip Patil..

    Hi Dilip,
    Varchar(n/max) is a variable-length, non-unicode character data. N defines the string length and can be a value from 1 through 8,000. Max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size is the actual length of the data entered
    + 2 bytes. We always use varchar when the sizes of the column data entries vary considerably. While if the filed data size might exceed 8,000 bytes in some way, we should use varchar(max).
    So the conclusion is just like Uri said, use varchar(max) or varchar(4000) is depends on how much characters we are going to store.
    The following document about varchar in SQL Server is for your reference:
    http://technet.microsoft.com/en-us/library/ms176089.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Trim All Text Field quickly?

    Currently i got over +40 textfields which uses DML and the column is 255 VARCHAR
    Wondering if there a quick way of trimming all these fields before the update happens.
    As of right now im doing it like this... is there way a to grab all textfield and just loop and trim or something simliar....? i was thinking of using javascript and copy paste 40 names in an array and loop trim and set value but that seem ugly to me. as i have to go in to it every time if a new field is needed...
    :P1_name := trim(:P1_name)
    :P1_boat := trim(:P1_boat)
    :P1_book := trim(:P1_book)
    :P1_game := trim(:P1_game)
    :P1_phone := trim(:P1_phone)
    :Px_item := trim(:Px_item)Edited by: PandaOracle on Feb 14, 2012 2:19 PM

    Hello PandaOracle,
    >
    PandaOracle wrote:
    As of right now im doing it like this... is there way a to grab all textfield and just loop and trim or something simliar....? i was thinking of using javascript and copy paste 40 names in an array and loop trim and set value but that seem ugly to me.
    >
    Instead of JavaScript there is a jQuery solution to you problem. Here is a JavaScript function you can call on your Submit button of your page:
    function f_trim_textb() {
      //trim all the text fields
      $('input[type="text"]').each(function() {
       oval = $(this).val();
       tval = $.trim(oval);
       $(this).val(tval);
      //submit the page
      apex.submit({request:"SUBMIT"});
    }Refer: http://api.jquery.com/jQuery.trim/
    Well however this is not the only solution! You can use PL/SQL process that executes before page submit and do thing what you have suggested above:
    :P1_name := trim(:P1_name)
    :P1_boat := trim(:P1_boat)
    :P1_book := trim(:P1_book)
    :P1_game := trim(:P1_game)
    :P1_phone := trim(:P1_phone)
    :Px_item := trim(:Px_item)Yet another solution is setting the attribute Post Calculation Computation in the Source section of Item Attributes to:
    trim(:Px_item)Hope it helps!
    Regards,
    Kiran

  • Update SQL statement in JDBC sender (system fields)

    All,
      Is it possible to update more than 1 field via the update sql statement ?
      Also, is it possible to use system fields ? 
      Something like this
      UPDATE database.table SET processed='Y', date = sy-datum
    Regards, Michel

    Hi
    use sysdate as suggested above
    Check your  generated SQL query format is correct
    At runtime you can find the genereated sql statements by doing configuraitons in Receiver JDBC adapter.
    In the JDBC Receiver adapter you have the Advanced Properties .
    Over there enter the following
    left column logSQLStatement
    right column true
    To see the query created ..
    Login to adapter monitoring ..select the relevant jdbc adapter.
    Now when any message is processed by the jdbc adapter in adapter monitoring at that time you will see a message link. When you click on that link a new window will open. In that window if you click on page down you will get to see the sql statement generated by the jdbc adapter.

  • Nokia E52 Message Sender Name Field is not updated...

    Nokia E52 Message Sender Name/Field is not updated automatically on Firmware 054.003!
    Issue 1: Message Sender Name/Field is not updated automatically after changes made in contacts.
    e.g. Message send by Mr. A is displayed in inbox, however when same contact changed to Mrs. AB in contacts does not update sender name/field inside inbox. Sender name remains Mr. A physically on handset. However the changes made to contacts and Message Sender Name/Field is updated automatically on use of Nokia PC Suite 7.1.60.0 and Nokia Ovi Suite 3.0.0.290 but not on phone. 

    Thanks for sharing the answer here, it is really helpful for others with the similar issue.
    Qiao Wei
    TechNet Community Support

  • Using a varchar field as number on ui

    Hello
    In one of the requirements we got to use a varchar field in db to store as number in UI. The user may specify + or - in the begining and it can be number up to 2 decimal places.
    So, how to achieve this?
    We are using jdev 11.1.1.6.2

    may be have a transient field with number datatype and use af:convertNumber with minFractionDigits and maxFractionDigits to 2. it would take - not sure about + sign (might remove automatically). convert this as string and try saving it with your actual field.

  • Regarding field likp-anzpk updation

    hi experts,
    in my requirement i have to update the field  (likp-anzpk)  in vl02n transaction with total no packages based on the total line
    items weight , but i found in some of the threads , that the field will be updated automatically when the packaging functionality
    is once activated ,
    i asked my client abt it ,they said that they r not activated packaging functionality.
    is there any other way to update this field , i tried writing code in badi LE_SHP_DELIVERY_PROC and in method
    IF_EX_LE_SHP_DELIVERY_PROC~SAVE_DOCUMENT_PREPARE , but it is useless
    pls suggest me on this if there is any other way.\
    thanks.

    hi break point,
    my clients actual requirement was , he creates stock transfer advice (STA) against the PO using the transaction
    VL10B , the moment STA was created ,he was asking for the field likp-anzpk has to be updated when he go to
    display mode to VL02N, when he double clicks on the generated STA no from VL10B.
    i have tried in the method  BEFORE SAVE AND PUBLISH DOCUMENT,it was executing when the user pressed SAVE
    button in VL02N ,
    can any body pls suggest which method i have to use to update the field likp-anzpk immediately when the STA was created
    from VL10B before the display of the sta in vl02n.
    let me know that any USER-EXIT or BADI  exists to fullfill this req
    regards\
    maheshlap

  • Pull the tax code automatically in the column field ??

    Could you please guide me how to pull the tax code automatically in the column field in the Sale Order form? I don't refer to the tax determination.

    Hi,
    In the Demo database, please create a new Business Partner and assign a tax code under the Business Partner Master Data > Accounting tab > tax tab. Make sure that the Business Partner is tax liable.
    Then try to create a SO for that BP Code and see whether the tax code is populated in the tax code field.
    Also, check that the Item taken into the SO is tax liable and under the Sales Tab what tax code is selected.
    Please update the results from the testing.
    Kind Regards,
    Jitin
    SAP Business One Forum Team
    Edited by: Jitin Chawla on Aug 11, 2011 5:55 PM

  • Automatic Trimming on Bindings Based Input Text

    Hi,
    Is there a way in ADF to automatically trim spaces when using bindings?
    I drag out from data control and it goes like this.
    <af:inputText value="#{bindings.City.inputValue}"/>
    <af:inputText value="#{bindings.Street.inputValue}"/>But say if user, entered sample data City = "Minnesota "
    Take note of the space, it is being sent to the web service as it is.
    Is there a way to configure the binding declaratively so that it would trim the space?
    I know I could do this with Java and I am just looking out for an alternative way.
    JDEV 11g PS5
    Web Service

    No without java, but I would write a converter and use this on the inputText fields.
    There is nothing out of the box which trims the string. You can use a regular expression validator, but this only gives the user a warning message.
    Timo

  • Not all fields are getting updated in transformation

    Dear all,
    Please help me in the following issue:
    I have the following scenario:
    DSO1 and CUBE1. From DSO1 to CUBE1 I have transformation. Fields are mapped one to one.
    Some of the fields are getting updated in transformation (22 fields) and some of them are not updated in transformation. (2 - storage location and steel grade).
    The fields exist in DSO 1 but don't go into cube.
    I did the following:
    1. deleted transformation and dtp, recreate = > not working
    2. copied the cube, and create new transformation and DTP...not working.
    Any help would be appreciated
    Thank you
    Ramona

    Hi Ramona,
    Storage location (standard infoobject 0STOR_LOC) has plant as compunding object, check whether this is the issue ? (may be check with Steel grade infoobject also).
    Else, do some RSRV checks on the DSO and Infoobject, if it doesn't bring up any issue, raise a message with SAP.
    Check your BW Support Pack level , is it the latest ? Give more details about the scenario ?
    Cheers,
    CK

  • Fields not getting updated in FBL3N and FBL5N

    Hi
    I have introduced new fields like material number, quantity sales document number, etc in through FBL3N --> Settings --> List special fields.
    Also i added one more field in 'sort key' as sales document number. I updated sort key in customer master and GL master (i.e. reconcliation account of customer A/c)
    But inspite of doing this, i can see those fields after change layout. But these fields are still empty. I do not know why its empty.
    When i changed sort key to sales document number, sales delivery number is coming instead of sales document number in assignment field.
    Please help

    Dear Meenakshi,
    Even though there are various fields available in FBL5N or FBL3N, all the fields are not updated for all the transactions. Based on transaction to transaction, fields get updated and mostly these are SAP standards. If you want certain fields, you need to develop Z reports accordingly.
    For example when GR is posted, system does not update PO number in Purchase order field. But alternatively it is updated in REFKEY1 field. Similarly when billing is done, it does not update material code in FI tables so it does not appear in FBL5N.
    Regarding Sort key, check with your SD consultant, what copy control it is used. In finance, assignment field is updated based on copy control used in SD.
    Regards,
    Niraj

  • This field cannot be updated as there are open sales order lines

    When trying to enable Item Attributes then I am getting a message "This field cannot be updated as there are open sales order lines". I cancelled the Sales Order ( which was having only 1 sales order line and that is also cancelled) but still I am getting the same message.
    How to overcome this problem.
    Khan

    Thanks Karthik & Sandeep........
    Issue got fixed. There was an open Sales order Line because of that line the issue was coming. After cancelling that SO Line, Users were able to update the Item field.
    Regards,
    Khan.
    http://moreapps4u.blogspot.com/

  • How system will automatically populate clearing date field for invoices paid similar to when payments are made to the vendors

    Hi SAP Gurus,
    Could you help me on this, How system will automatically populate clearing date field for invoices paid similar to when payments are made to the vendors.
    Regards
    Mohan

    Hi Ramakrishnappa,
    If you clear the invoice against payment, then the invoice clearing date would be payment document posting date.
    Regards,
    Mukthar

  • How can I set up cross fade to automatically trim files ?

    How can I set up cross fade to automatically trim the two files to size when fading between them? Thanks

    Hi, thanks for the reply. What I meant was that in Pro Tools, you can highlight an area between two tracks and crossfade. Then the files are exactly trimmed automatically so there is no excess overlap of the edges of both files. In Logic it seems to leave the overlap, and this can be a problem when you accidently click the wrong place and the underlying file is bought to the front, changing the crossfade area. I wish it to trim the excess so there is no danger of the lower file edges coming forward.

Maybe you are looking for

  • Billing against delivery order from bank

    Dear All, If we are giving delivery against Delivery Order given by the bank, do we have to map this scenario in sap or how do map this. some suggestions Edited by: varada rajan on Jan 15, 2008 9:18 AM

  • How to convert string into date datatype

    hi! there i've a date in string format like MM/dd/yyyy eg:String sDate = "01/30/2002"; and i want to convert this string format into java date format same as 01/30/2002 only when i write like this SimpleDateFormat formatter = new SimpleDateFormat ("M

  • Is it possible to display records without master detail relationship?

    Hi all, I've a form for importing excl to oracle with column mapping. i.e I've display excl column heading on the form. In front of each excel column heading I've provide a list item which contains table column heading so user can map his excl column

  • MRP exception message

    Hi, How to  interpret the MRP exception messages in MD06? 1.what is the meaning of Stock days supply field showing 999,9-  (meaning of 999,9-) 2.what is the meaning of 1st receipt day supply & 2nd RDS 3.Exception message group 3 showing the value 19

  • What exactly does the search portlet searches?

    Hi there, I'm wondering if the search portlet searches in the entire Portal? Does it searche also in the documents of the Portal? Thanks