In insert: Space after period and before carriage return is being ignored

I am using Oracle 11.2.0.2.
let say I create table temp(a varchar2(20);
insert into temp values ('value.
valuue2');
I have put space after 'value. ' but it is being ignore when I run it from linux host in sqlplus.
The space seems to be preserved when I insert it from TOAD/Windows xp.
Any idea what might be causing it.

hI,
I have the same result in SQLPLUS.
I would not rely on code with strings spread over multiple lines you should use the below code to add newlines:
insert into temp values ('Yes.Space. ' || chr(10) || 'x');This makes it very clear there is and a space and a newline.
This is much easier to maintain as well.
Just to compair the two, see below:
select
  LEVEL
  ,substr(a ,level,1)
  ,ASCII( substr(a ,level,1) )
from
SELECT
'YES.Space.
x' A
FROM
  DUAL
connect by --NOCYCLE
  level <= length(a)
LEVEL SUBSTR(A,LEVEL,1) ASCII(SUBSTR(A,LEVEL,1))
    1 Y                                       89
    2 E                                       69
    3 S                                       83
    4 .                                       46
    5 S                                       83
    6 p                                      112
    7 a                                       97
    8 c                                       99
    9 e                                      101
   10 .                                       46
   11                                         32
   12                                          10
   13 x                                      120
13 rows selected
select
  LEVEL
  ,substr(a ,level,1)
  ,ASCII( substr(a ,level,1) )
from
SELECT
'Yes.Space. ' || chr(10) || 'x' a
FROM
  DUAL
connect by --NOCYCLE
  level <= length(a)
LEVEL SUBSTR(A,LEVEL,1) ASCII(SUBSTR(A,LEVEL,1))
    1 Y                                       89
    2 e                                      101
    3 s                                      115
    4 .                                       46
    5 S                                       83
    6 p                                      112
    7 a                                       97
    8 c                                       99
    9 e                                      101
   10 .                                       46
   11                                         32
   12                                          10
   13 x                                      120
13 rows selected Regards,
Peter
Edited by: Peter vd Zwan on Apr 19, 2012 1:06 PM

Similar Messages

  • Possible to control space after periods and commas?

    There's a font i'd like to use as a body text font, but sometimes the spaces after periods and commas are inadequate. Is there a way to control this in InDesign? or must this be resolved by manipulating the font in a font editor?
    thanks
    Kurt Hoffman

    but sometimes the spaces after periods and commas are inadequate...
    I'm not sure either solution will really work well with justified text.
    When you say sometimes, it sounds like your text is justified and the space after periods is variable. Peter's GREP solutions would track the space after a period but the amount would still be variable when the text  is justified. So you could also look at the Justification setting for the style:
    The default Justification setting which allows a significant difference between min and max word spacing, and no difference in letter spacing:
    Changing the Word Spacing to 90% | 100% | 120% and the letter spacing to -2% | 0% | 2% creates a more consistent space after the periods.

  • How can I stop Dreamweaver from inserting spaces after variables?

    How can I stop Dreamweaver from inserting spaces after
    variables?
    Example:
    "...write to you@<!--#echo var="uu" --> and ..."
    is changed by DreamWeaver to
    "...write to you@
    <!--#echo var="uu" -->
    and...>
    When saving or doing other editing, DreamWeaver adds a space
    and a line break before and after the variable. The line break
    isn't hard and doesn't show, but the spaces added before and after
    the variable DO show in browsers. That looks rather stupid and
    incompetent, and requires hand editing on the server after
    uploading.
    Line wrap and code formatting are turned off.
    Is manual correction after uploading the only solution to
    this problem?
    Thanks
    DearWebby

    DearWebby,
    We already discussed this offline, but I want to post the fix
    here for
    the sake of posterity:
    1. Edit > Tag Libraries…
    2. Open HTML Tags folder
    3. Select "directive" folder icon (not really a folder)
    4. Change Line breaks: setting to "No line breaks"
    5. Click OK
    HTH,
    Randy
    > How can I stop Dreamweaver from inserting spaces after
    variables?
    >
    > Example:
    > "...write to you@<!--#echo var="uu" --> and ..."
    > is changed by DreamWeaver to
    > "...write to you@
    > <!--#echo var="uu" -->
    > and...>
    >
    > When saving or doing other editing, DreamWeaver adds a
    space and a line break
    > before and after the variable. The line break isn't hard
    and doesn't show, but
    > the spaces added before and after the variable DO show
    in browsers. That looks
    > rather stupid and incompetent, and requires hand editing
    on the server after
    > uploading.
    >
    > Line wrap and code formatting are turned off.

  • After Image and Before image in case of Generic extraction

    Hi Guru's,
    Please explain the concept of the After image and before image wrt to Generic extraction.

    hi,
       consider a record in data source suppose it is return to ods
    now
    materid matnme  quantiy
    1         tiles         20
    another recored with the same charcteridti arrive in bw
    i.e
    1         tiles          78.
    now rhe reault is
    1 tiles     78(it is new image) for new image
    1 tiles     20(before image)
    1 tiles   +58(additive image) for additive image.

  • After Range and Before Range

    Hi Experts,
    I encounter a problem with my templates that use After RANGE or BEFORE RANGE.
    In Planning Application, there is no problem downloading the file that uses AFTER RANGE and BEFORE RANGE but in CONSOLIDATION Application I was unable to download or open the file with AFTER RANGE and BEFORE Range.
    When I tried to open it, the Excel Program Hangs or Not Responding, then I must End Process to use the Microsoft Excel again.
    Any suggestions?
    thanks

    Why don't you just put contents of ds_remote_schema.ldif from the IS6.0 install packages to your schema file, any ##name you want and tell installer to use preconfigured directory?! Up to IS6.0ea2 schema was a separate file.

  • Freight after ED and before VAT, Discount after ED and before VAT

    Hi,
    We have below two scenario and we want to map this.
    1) Discount after ED and Before VAT
    2) Freight After ED and Before VAT.
    first requirement will be fullfilled by assigning subtotal '6' to discount condition in M/08 and 362 routine to BASB and 363 routine to VAT condition in OBQ3
    Second requirement will be fullfilled by assigning subtotal '6' to Frieght condition in M/08 and assigning 363 routine to VAT condition in OBQ3 and removing 362 routine against of BASB.
    We want to map it both pl. guide us how to map BASB value in TAXINN.
    Regards,
    Rajesh

    Hi Ajit,
    Appreciate your answer.
    Taking you answer into consideration i have below excersice. 
    Subtotal '6' to Freight and Discount conditions
    362 routine to BASB conditon type in OBQ3
    363 routine to VAT condition in OBQ3
    it will work perfect in case of Discount after ED before VAT. but in case of Freight after ED bfroe VAT its not working.
    Since 362 routine, will do minus '6' subtotal value and plus '4' vlaue.
    If we add freight component to condition then system will reduce amount from BASB. that is practicly we dont wan't.
    expected your comment.
    Regards,
    Rajesh

  • BufferedReader Problem (inserting space after every character)

    (This is a message I sent to an Aglet forum, however I thought maybe someone here could help me with the BufferedReader problem...with the spacing...read below)
    -Blake
    ok here's what I'm attempting to do.
    I have a Master Aglet that creates a slave which is dispatched to a remote site. The Slave then opens a log file, reads it, and then is supposed to read the file line by line and send each line as a message back to the Master. As the master receives each line it appends the line to the window it created earlier.
    I don't know what the problem is...it won't display the log file in the master window.
    It does display each line on the console window.I added a println() function to make sure the String array was getting the information. There is a small problem with that as well because it inserts a space after EVERY character (BufferedReader problem??)...what is up with that? for example:
    If the log file looked like: This is a log file entry.
    the console looks like this when it is printed: T h i s i s a l o g f i l e e n t r y .
    .... I had done something in a similiar program...and it worked just fine. here's some source code:
    <b>Master:</b>
    else if (msg.sameKind("Log")) {
    try {
    //println for testing purposes
    System.out.println(msg.getArg());
    appendMessage(" " + msg.getArg() + "test \n");
    } catch (Exception e) {
    System.out.println(e.toString());
    <b>Slave: </b>
    File log = new File("C:\\Aglets2.0.2\\public\\WINDOWSUPDATE.log");
    FileReader fr = null;
    try{
    fr = new FileReader(log);
    } catch (FileNotFoundException e) {
    System.out.println(e);
    BufferedReader br = new BufferedReader(fr);
    //Get filename of log
    try {
    Message msg = new Message("FileName", log.getName());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    //read each line of file and send back to Master as a message
    try{
    int i = 0;
    while ((s = br.readLine()) != null) {
    i++;
    count = i;
    for (int j = 0; j < count; j++)
    System.out.println(s[j]);
    //send message back to Master Aglet with log file information
    try {
    Message msg = new Message("Log", s[j]);
    mProxy.sendMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    //close file reader
    fr.close();
    } catch (IOException e) {
    System.out.println(e.toString());
    }

    actually i did declare s, you just don't see it there because i only posted some of the code....
    I fixed the "spacey" problem by using a FileInputStream instead of a bufferedreader....
    like this (i'll post the whole code here:
    public class Slave extends BlindAglet {
        AgletProxy mProxy = null;
        boolean back = false;
            char[] c = new char[1000];
        BufferedReader br = null;
        int count;
        // Do some tasks when the aglet is created
        public void onCreation(Object init) {
            // Must make a note of the master here
            mProxy = (AgletProxy)init;       
            // Add our own listener and adapter
            addMobilityListener(
                new MobilityAdapter() {
                    // Using this as a safety check in case we get caught in a loop in the same host
                    public void onArrival(MobilityEvent event) {                   
                        try {
                            mProxy.sendMessage(new Message("NewSlaveProxy", getAgletContext().getAgletProxy(getAgletID())));                                                            
                        } catch (InvalidAgletException iae) {
                            System.out.println(iae);
                        } catch (NotHandledException ex) {
                            System.out.println(ex);
                        } catch (MessageException ex) {
                            System.out.println(ex);
                        //Are we back to origin?
                            if(back) {         
                                 back = false;     
                                try{
                                     FileWriter fw = new FileWriter("test.txt");                                                                  
                                 for (int i = 0; i < count; i += 2){ 
                                           fw.write(c);
                             fw.close();
                        } catch (IOException e) {
                                  System.out.println(e);
                                  dispose();
                             dispose();
    ); /* End of Adapter */
    public void run() {
         // Are we at home base?
    if (atHome()) {
    try {
    dispatch(new URL("atp://darklord:4434"));
    } catch (Exception e) {
    System.out.println(e.toString());
         try{
         File log = new File("C:\\Aglets2.0.2\\public\\WINDOWSUPDATE.log");
         FileInputStream f0 = new FileInputStream(log);
    //Get filename of log
    try {
         System.out.println(log.getName());
    Message msg = new Message("FileName", log.getName());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
              //read each line of file and send back to Master as a message
              try{               
         int size = f0.available();
         int i = 0;
         for (i = 0; i < size; i++) {
              c[i] = (char) f0.read();
    //send message back to Master Aglet with log file information
                             try {
                        Message msg = new Message("Log", c[i]);
                        mProxy.sendOnewayMessage(msg);
              } catch (InvalidAgletException iae) {
                             System.out.println(iae.toString());
                        } catch (Exception e) {
                             System.out.println(e.toString());
    count = i;
              } catch (IOException e) {
                   System.out.println(e.toString());
                   } catch (FileNotFoundException e) {
                   System.out.println(e);
         back = true;      
         returnHome();
    * Returns true if the current host is our origin
    public boolean atHome() {
    if (getAgletInfo().getOrigin().equals(getAgletContext().getHostingURL().toString()))
    return true;
    else
    return false;
    * Allows a slave to contact it's master and ask for a retraction.
    public void returnHome() {
    try {
    Message msg = new Message("RetractMe");
    msg.setArg("url", getAgletContext().getHostingURL());
    msg.setArg("id", getAgletID());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    * Return a reference to our Master's proxy
    public AgletProxy getMasterProxy() {
    return mProxy;
    } /* End of Class

  • FREIGHT AFTER ED AND BEFORE TAX (CST/VAT)

    Hi Friends,
    We need the freight to be calculated after Excise duty and before Tax ( CST/VAT). For example
    Basic Value = 100
    ED 10% = 10
    ECS 2% = .2
    SECS 1% = .1
    10.3
    Freight = 10
    120.3
    CST 3% = 3.60
    Total Value = 123.90
    In our case Freight is calculation after TAX. But we need to calculation of CST/VAT includes freight.
    Kindly suggest how to make changes in pricing procedure.
    I created one condition in pricing procedure for freight, but the same is not transferring to tax procedure for calculation. I also created one condition in tax procedure. But value is not passing to tax procedure.
    Knidly give the solution at the earliest.
    Regards,
    Shital Deshpande

    Check in tax procedure(OBQ3) whether freight condition(Z*) is included after ed subtotal ?
    Whether you maintained condition record(FV11) for lumpsum Z* freight condition ?

  • Users logged in after 8 and before 6 for the past year

    Hi
    I have been asked by audit to provide a list of users who have logged into ECC6 between 20:00 and before 06:00 within the past year, is there a way to get this information?
    Your help would be appreciated.
    Thanks
    Julian

    Hi,
    You get this information from tcode- SM20 (Security Audit log) by selecting the audit classes for dialog/RFC logon and required date-time ranges. For activating Security log, audit filters need to be activated first via SM19.
    Thanks
    Sandipan
    Edited by: Sandipan Choudhury on Mar 3, 2011 5:26 PM

  • TEXT datatype in Stored Procedure and concat Carriage returns

    Anyone,
    I am trying to create a stored procedure that will allow me to grab a bunch of 255 Char records in a cursor and concatenate them together adding a carriage return after each row.
    Here is pseudo code would look like:
    CREATE OR REPLACE PROCEDURE myproc IS
       CURSOR c1 IS
          SELECT myVARCHAR_255_col
          From mytable
          where criteria = something
          rec c1%ROWTYPE;
          var_my_new_TEXT TEXT;
    BEGIN
       OPEN c1;
       LOOP
          FETCH c1 INTO rec;
          EXIT WHEN c1%NOTFOUND;
            IF rec.myVARCHAR_255_col IS NOT NULL THEN
                var_my_new_TEXT := CONCAT(rec.myVARCHAR255_col, '%char(13)+char(10)%')
            END IF
       END LOOP;
       CLOSE c1;
    END;There is a bit more to code then this but most important issue is how to deal with TEXT datatype? Should/can it be RAW instead. And also how do I get a CARRIAGE RETURN into the body of the column of type TEXT.
    Thanks in advance,
    Miller

    Is there a specific reason for concatenating 255 characters at a time and returning it? This example may be of help.
    SQL> set long 500
    SQL> DESC MYTABLE
    Name                                      Null?    Type
    COL1                                               NUMBER(2)
    COL2                                               LONG
    SQL> select * from mytable;
          COL1
    COL2
             1
    This text is very long This text is very long This text is very long This text i
    s very long This text is very long This text is very long This text is very long
    This text is very long This text is very long This text is very long This text
    is very long This text is very long This text is very long This text is very lon
    g This text is very long This text is very long This text is very long
    SQL> select length(col2) from mytable;
    select length(col2) from mytable
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG
    SQL> select length('This text is very long This text is very long This text is very long This text i
      2  s very long This text is very long This text is very long This text is very long
      3   This text is very long This text is very long This text is very long This text
      4  is very long This text is very long This text is very long This text is very lon
      5  g This text is very long This text is very long This text is very long') from dual;
    LENGTH('THISTEXTISVERYLONGTHISTEXTISVERYLONGTHISTEXTISVERYLONGTHISTEXTISVERYLONG
                                                                                 393
    SQL> R
      1  DECLARE
      2  V_VARIABLE VARCHAR2(4000);
      3  BEGIN
      4  SELECT COL2 INTO V_VARIABLE FROM MYTABLE;
      5  DBMS_OUTPUT.PUT_LINE(SUBSTR(V_VARIABLE,1,255));
      6  DBMS_OUTPUT.PUT_LINE(SUBSTR(V_VARIABLE,256,138));
      7* END;
    This text is very long This text is very long This text is very long This text
    is very long This text is very long This text is very long This text is very
    long This text is very long This text is very long This text is very long This
    text is very long Th
    is text is very long This text is very long This text is very long This text is
    very long This text is very long This text is very long
    PL/SQL procedure successfully completed.
    SQL> SELECT SUBSTR(COL2,1,255) FROM MYTABLE;
    SELECT SUBSTR(COL2,1,255) FROM MYTABLE
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG

  • Discount after Excise And Before VAT

    Dear All,
    We have the below requirement, Vendor is giving the discount After Taxes & before calculating the VAT. How to meet this requirement ?
    Right now i have created a condn type & added in tax procedure, But not able to meet the requirement.
    We are using TAXINN tax procedure.
    Ex : Base Price is Rs 100
           BED       Rs 8
           ECess    Rs 1.60 
           SECess  Rs 0.80
    Total Inc Taxes is 110.40
    Then we need discount Say Rs 2/Ltr
    Value After Disc is Rs 108.40
    VAT(12.5%)   Rs 13.55
    Actual PO Value Rs 121.95
    B/regds,
    CB

    Hi,
    I think you can make a condition type and add this condition type in your pricing procedure below the step of Excise duties. After this condition step, then put the Sales tax conditions to calculate on this step.
    Ex: 10   Base Price
          20   Excise Duty
          30   Cess
          40   ECess
          50   Total Amount Incl of Duties
          60   Discount on this Total Amt Incl Duties
          70   Total Amount Incl of Duties and Disc (Step 50 to 60)
          70   Sales Tax ( from Step 70 )
    Hope this clears u r doubt.
    Regards
    Anand.

  • Is it possible to draw on a picture after loading and before displaying it?

    Hi to all :)
    I intend to write a small applet(connected with a server using RMI, but that's not important :) ) that represents the 'tic-tac-toe' game.
    I've planned to create 3 pictures - blank, containing a circle and containing a cross.
    Then I think to used 9 JButton-s and set the blank pic as an Icon for the JButton. An action event listener will change the picture to circle ot cross and so on...
    I would like to draw a line over the 3 pictures for the winner at the end of the game.
    Is it possible to load a circle or cross picture, then draw a horizontal/vertical/diagonal line on it at runtime and after that set it as an Icon for the Jbutton ?
    Thanks in advance. Take care :)

    To my knowledge, you can't overlay icons on a JButton without subclassing it and overriding paintComponent. In that case, II suppose you could try painting over all your buttons with something like:parentContainer = new JPanel() {
        @Override
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            drawLine(0, 0, 100, 100); //etc...
    parentContainer.add(myFirstButton);
    //etc.

  • Difference between cash value after customs and before customs?

    Hello experts.
    Where can you percieved the diffrerence on the landed costs if you select the allocation by before/after customs?
    Looking forward to your reply,
    Kind regards

    Hi Erickson,
    In the landed cost you can allocate your customs cost. Customs cost allocation to items can be difference per item customs cost percentage (as defined in the master data) or based on total cost allocation (actual customs in the landed cost screen).
    If your landed cost allocated to total value after custom, then that cost will be allocated based on item value after customs (item cost + customs).
    Example:
    1. Item A; Value 500; customs rate : 10%
    2. Item B; Value 1500; customs rate: 15%
    Total landed cost 2000
    Landed Cost Allocation:
    => cash value before customs:
    1. Item A
         => Customs = 10% * 500 = 50
         => Landed cost = (500/2000) * 2000 = 500
         => final cost Item A = (item cost + customs + landed cost) = 500 + 50 + 500 = 1050
    2. Item B
         => Customs = 15% * 1500 = 225
         => Landed cost = (1500/2000) * 2000 = 1500
         => final cost Item A = (item cost + customs + landed cost) = 1500 + 225 + 1500 = 3225
    => cash value before customs:
    1. Item A
         => Customs = 10% * 1000 = 100
         => Cash value after Customs = 500 + 100 = 600
         => Landed cost = (600/2275) * 2000 = 483.52
         => final cost Item A = (item cost + customs + landed cost) = 500 + 100 + 483.52 = 1033.52
    2. Item B
         => Customs = 15% * 1500 = 225
         => Cash value after Customs = 1500 + 225 = 1725
         => Landed cost = (1725/2275) * 2000 = 1516.48
         => final cost Item A = (item cost + customs + landed cost) = 1500 + 225 + 1516.48 = 3241.48
    => If actual customs directly being input into landed cost screen, the would be no difference on the landed cost allocation since all customs allocated proportionally.
    Cheers

  • 'Error: 500 SC_INTERNAL_SERVER_ERROR' after init() and before doGet() method in servlet.

    Hi to you all,
    I have been working with ias6.0 sp2 on Unix.
    I have a simple web application with servlets and packaged auxiliary classes. Deployment seems all good. But when I try to call my first servlet with URL, I get this message on the navigator : "Error: 500 SC_INTERNAL_SERVER_ERROR
    null ".
    In the log file, I have that :
    "error: Exception: SERVLET-execution_failed: Error in executing servlet myServlet: java.lang.NullPointerException [...]
    at com.netscape.server.servlet.servletrunner.ServletInfo.checkAuthorization (Unknown source)
    error: APPLOGIC-caught_exception: Caught Exception:
    java.lang.NullPointerException
    at com.netscape.server.servlet.servletrunner.ServletInfo.popPrincipalFromTLD (Unknown source )
    My application works well with iws. So, what's up ?
    The init() method is executed, but not the doGet() one.
    Well, hear you soon !
    Paul-Emile

    Hi,
    Although it is difficult to point out the place where the error exactly occurs, I can suggest the reasons. The possible place for error to occur normally lies in the database connectivity. When the HttpServlet is not able to communicate with the database or encountered errors while communicating with the database. Please let me know if this helps.
    Regards
    Raj

  • Discount after exise and before VAT

    Hi,
    We have a requirement like this
    Basic Price Rs.100/-
    Excise 10%       10/-
    Discount       Rs 20/-
    Vat 4%        Rs.3.60/-  (100+10-20=90*4)
    I am not able to resolve this requirement in 5.0 and 6.0
    I have resolved in 4,7 by using sub total 6 in Discount condition in MM pricing
    but it is not happening in ECC 5 and 6 system is calculating Vat on Rs.110/-
    Thanks
    Prasad

    Hi,
    We have a requirement like this
    Basic Price Rs.100/-
    Excise 10% 10/-
    Discount Rs 20/-
    Vat 4% Rs.3.60/- (100+10-20=90*4)
    I am not able to resolve this requirement in 5.0 and 6.0
    I have resolved in 4,7 by using sub total 6 in Discount condition in MM pricing
    but it is not happening in ECC 5 and 6 system is calculating Vat on Rs.110/-
    Thanks

Maybe you are looking for