Leading blank space in data

When I query a form on a field with data that contains as its
first character a blank space, why do I get an error 'invalid
relational operator'
On examining the underlying SQL query, I find that the relational
operator = has been overwritten with a blank space. This happens
in any form in Developer/2000. A field value without a leading
blank does nor create a problem
Thanks
Gnana Supramaniam
null

Try it with ltrim(rtrim(field name)).
It will work.
Syed.
Gnana Supramaniam (guest) wrote:
: When I query a form on a field with data that contains as its
: first character a blank space, why do I get an error 'invalid
: relational operator'
: On examining the underlying SQL query, I find that the
relational
: operator = has been overwritten with a blank space. This
happens
: in any form in Developer/2000. A field value without a leading
: blank does nor create a problem
: Thanks
: Gnana Supramaniam
null

Similar Messages

  • File Content Conversion Removes Leading Blank/Space

    I'm having a problem where file content conversion is trimming leading blanks/space/whitespace from fields when reading in the inbound file.  I've seen where people have posted that you need to use fieldContentFormatting to prevent content conversion from stripping the leading/trailing whitespace.  I added that parameter to my list (see below example) but it still appears to be trimming the leading whitespace.  Look forward to hearing your thoughts.  Here are the details:
    I'm using fixed length file content conversion for Sender File Adapter (SP15).  I have the following parameters set:
    Document Name = MaterialData
    Recordset name = item
    Recordset Structure = MaterialLine, 1
    I have:
    MaterialLine.fieldNames = matno_external, mat_description
    MaterialLine.fieldFixedLengths = 40, 40
    MaterialLine.fieldContentFormatting = nothing, nothing
    The following is the input file (notice spaces prior to second occurrence of material numbers)
    ZED00000001                             AIMS LIGHT A
    ZED00000001                            AIMS LIGHT B
    ZED00000002                             AIMS SWITCH A
    ZED00000002                            AIMS SWITCH B
    ZED00000003                             AIMS SEMICONDUCTOR A
    ZED00000003                            AIMS SEMICONDUCTOR B
    The following is the source XML after file content conversion from SXMB_MONI (note spaces no longer exist in matno_external tag).
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MaterialData xmlns:ns="http://xxxxxxx.com/yyy/test">
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000001</matno_external>
      <mat_description>AIMS LIGHT A</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000001</matno_external>
      <create_date>10/09/06</create_date>
      <mat_description>AIMS LIGHT B</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000002</matno_external>
      <mat_description>AIMS SWITCH A</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000002</matno_external>
      <mat_description>AIMS SWITCH B</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000003</matno_external>
      <mat_description>AIMS SEMICONDUCTOR A</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000003</matno_external>
      <mat_description>AIMS SEMICONDUCTOR B</mat_description>
      </MaterialLine>
      </item>
      </ns:MaterialData>

    Thanks all for your attempts but I figured it out and wasn't this the biggest case of irony.
    Here I was trying to prevent leading spaces from being trimmed in the loading of my file and my problem was that when I typed:
    MaterialLine.fieldContentFormatting
    I actually left a "blank" at the end of the "g" in Formatting.  Apparently XI didn't like that and neither gave me a runtime or compile error.  Anyway I found this and though I'd share in case anyone else encounters it.  I removed the blank and all is working now.

  • Removing leading zeros and leading blank spaces from an input field

    Hi All,
    I have an input field which is alphanumeric and i need to remove the leading zeros and blank spaces in it , but intermediate spaces should be kept .
    so i used the UDF
            String output = input.replaceFirst("^0+","");
            return output;
    but this code does not remove the leading blank spaces . Can anybody help in modifying this code so that even the leading blank spaces along with leading zeros  can be removed .
    Regards ,
    Loveena .

    lets say input is a
    then
    int len = a.length();
    for(int i;i< length;i++)
    if(a.substring(0,1).equals(" ") || a.substring(0,1).equals("0"))
    a = a.substring(1,len);
    return a;
    hope you got the logic so that you can enhance it better

  • Leading blank space in text field

    Hi guys,
    i have defined include type in designer(adobe) to display text from SO item. which is working very much fine.
    If the SO item text is maintained with leading tabs, adobe is able to show the text exactly.
    But if the SO item text is maintained with leading spaces, adobe is defaulting value to left by deleting the leading spaces.
    I need to show the value in mirror image. Hence i need to retain the leading spaces in adobe too.
    Appreciate valuable suggestions

    HI,
    Yes, you are right. I was checking weather we could handle this without scripting.
    Moreover, can anyone check whatz wrong with this source. I am trying to pad tab infront of the field value.
    But its not happeing.
    data.BodyPage_Details.sf_Tsk_Tab_Loop.sf_Seq_Tab_Loop.sf_Opr_Tab_Loop.sf_PRT.sf_PRTData.sf_prt_header_text.PRT_LONG_TEXT::initialize - (JavaScript, client
    if ( (sf_PRT.sf_PRTData.sf_prt_header_text.PRT_LONG_TEXT.rawValue)  != null   )
        this.rawValue =  "\t" + this.sf_PRT.sf_PRTData.sf_prt_header_text.PRT_LONG_TEXT.rawValue;
        this.presence =  "visible" ;
    else
         this.presence     =  "hidden";

  • Removing Blank Spaces caused by Supressed data

    Hi All,
    How we can remove the balank spaces caused by supressed data in crystal reports.for eg
    Item Code:I0002
                   Timer
                   For Time Info
                   100
    ItemCode:I00003
                   Pen
                   20
    if there is txt added against pen as for Timer(For Time Info)
    it will leave blank space.How to remove blank space.
    Thanks,
    Neetu

    Hi Neetu
    I have tried replicating your requirement at my end using Xtreme Sample database below are the steps which I have followed.
    1)I have customer Id field,Customer name field field placed in details section.
    2)Click on Section Expert
    3)Click on Details.
    4)Check the second option as "Suppress(No Drill Down)".In front of that there is one icon as "X-2".Double click on that icon.
    5) Type the below formula
         if {Customer.Customer ID}=157 and {Customer.Customer Name} ="Aruba    
         Sport" then true
        else if {Customer.Customer ID}=148 and {Customer.Customer Name}
         ="Koala Road Bikes" then true
         else false
    6)Save and close.
    With this formula where condition matches the specific criteria it will suppress the section and there will be no blank spaces.The rest of the data will be shown.
    Hope it will help you.
    Regards
    Asha

  • XML Publisher Printing Blank spaces for no data

    hi All,
    We are trying to build a report using XML Publisher and .RTF template.
    We have dynamic fields like Wt Uom, Volume Uom, Dimensions.So when we don’t have data in these fields XML Publisher consider these data as blank and so blank spaces comes. If we have data in these fields then blank spaces will not come, as the blank spaces will be filled up the data of Wt, Volume and Dimension fields.
    We want to remove the blank spaces for the items that do not have any corresponding data for the fields. Is there any way we can remove the field header and the blank spaces that are there?
    Please help
    thanks,
    Chandan

    Hi Chandan
    The element is present in the XML data, but it has one space
    <?if:element_name and element_name=' ' ?> desired behavior when
    the element exists but value has one space <?end if?>
    Or
    what you can do is trim the data before forming XML .

  • How to remove the extra or blank space from RTF Template

    Hi All,
    Try to remove the extra space from  xml template.
    Here I have attached the .xml file with .rdf, here the issue is when you load the data we will get 2 page output but when I am trying to add any column or extra space in the last page of this template the output getting 4 pages with lot of blank space. Could you please guide me to solve this issue.
    Could you please let me know how to do the attachement in this forum as I am new to this community.
    Regards,
    Sushant

    Can you drop in a mail with RTF, xml data to [email protected], I will help you on the issue.

  • Instead of showing 0 in report its getting blank space

    Hi Sap Gurus.
    I am running the query in rsrt, in my report i am getting instead of 0 values it is showing Blank space. But in my source data there is value is 0. But when i execute the query its getting blank space. How to over come this problem.
    could u please let me know.
    Best Regards,
    venkat.

    Hi,
    Check out this.. it might solve your issue.
    in Query Properties
    Tab: value display >> Zero value Display >> Select "zero as Default Text"  under Display Zeros
    And Tab:  Rows/Columns >> Supress Zeros Option  >> "Do not Supress"  is selected.
    Thanks
    Jitu
    Edited by: Jitenderkumar Danduvia on Feb 23, 2010 12:45 PM

  • Lots of blank space when printing array with only last element printed

    I have a slight problem I have been trying to figure it out for days but can't see where my problem is, its probably staring me in the face but just can't seem to see it.
    I am trying to print out my 2 dimensional array outdie my try block. Inside the trying block I have two for loops in for the arrays. Within the second for loop I have a while to put token from Stringtokeniser into my 2 arrays. When I print my arrays in this while bit it prints fine however when I print outside the try block it only print the last element and lots of blank space before the element.
    Below is the code, hope you guys can see the problem. Thank you in advance
       import java.io.*;
       import java.net.*;
       import java.lang.*;
       import java.util.*;
       import javax.swing.*;
       public class javaflights4
          public static final String MESSAGE_SEPERATOR  = "#";
          public static final String MESSAGE_SEPERATOR1  = "*";
          public static void main(String[] args) throws IOException
             String data = null;
             File file;
             BufferedReader reader = null;
             file = new File("datafile.txt");
             String flights[] [];
                   //String flightdata[];
             flights = new String[21][7];
             int x = 0;
                   //flightdata = new String[7];
             int y = 0;
             try
                reader = new BufferedReader(new FileReader(file));   
                //data = reader.readLine();   
                while((data = reader.readLine())!= null)   
                   data.trim();
                   StringTokenizer tokenised = new StringTokenizer(data, MESSAGE_SEPERATOR1);
                   for(x = 0; x<=flights.length; x++)
                      for(y = 0; y<=flights.length; y++)
                         while(tokenised.hasMoreTokens())
                            //System.out.println(tokenised.nextToken());
                            flights [x] [y] = tokenised.nextToken();
                            //System.out.print("*"+ flights [x] [y]+"&");
                   System.out.println();
                catch(ArrayIndexOutOfBoundsException e1)
                   System.out.println("error at " + e1);
                catch(Exception e)
                finally
                   try
                      reader.close();
                      catch(Exception e)
             int i = 0;
             int j = 0;
             System.out.print(flights [j]);
    //System.out.println();

    A number of problems.
    First, I bet you see a lot of "error at" messages, don't you? You create a 21x7 array, then go through the first array up to 21, going through the second one all the way to 21 as well.
    your second for loop should go to flights[x].length, not flights.length. That will eliminate the need for ArrayIndexOutOfBounds checking, which should have been an indication that you were doing something wrong.
    Second, when you get to flights[0][0] (the very first iteration of the inner loop) you are taking every element from the StringTokenizer and setting flights[0][0] to each, thereby overwriting the previous one. There will be nothing in the StringTokenizer left for any of the other (21x7)-1=146 array elements. At the end of all the loops, the very first element in the array (flights[0][0]) should contain the last token in the file.
    At the end, you only print the first element (i=0, j=0, println(flight[ i][j])) which explains why you see the last element from the file.
    I'm assuming you have a file with 21 lines, each of which has 7 items on the line. Here is some pseudo-code to help you out:
    count the lines
    reset the file
    create a 2d array with the first dimension set to the number of lines.
    int i = 0;
    while (read a line) {
      Tokenize the line;
      count the tokens;
      create an array whose size is the number of tokens;
      stuff the tokens into the array;
      set flights[i++] to this array;
    }

  • Issues in exporting SSRS report to PDF format in Report Server - Blank spaces are deleted

    Hi Gurus,
    I have a problem in exporting SSRS report to PDF format. It deletes all the blank spaces when I use bullet in a Text box and try to export to PDF formt in Report Server . For example
    •             Project submitted to the TRC
    Result in PDF format:
         • ProjectsubmittedtotheTRC
    I also noted that when I try to export to PDF in Visual Stuio 2005 (Business Intelligence development studio), it does not delete any blank spaces and shows the correct aligned Data in PDF format.
    Please help me as it is frustrating a lot
    I would highly appreciate for your quick response 

    Was there ever a solution found for this as i have the same issue.
    When bullet point is entered in a field all the spaces are removed when exported to PDF
    i tried exporting to excel and it does not remove spaces, however this is no use to me as it needs to be in PDF
    Using IE 7 (Don't think the browser has anything to do with it as this happened via a subscription)
    Didn't know SSRS had specific Service Packs, i though they came as patches to SQL Server (SQL Server is on Service Pack 3)
    This should be easy to replicate all you need to do is copy text containing a bullet point into a sql server database field and then add this field to a report export to pdf and the spaces are gone
    Thanks in advance,
    Mark Brunton
    brunzire

  • How to remove extra blank spaces from log file.

    i have created a log file which contain the logs of a program. the logs are getting created fine for the first execution of the program but from the second time the log file is getting blank space's after every character.
    i have used the code to append the text in log files few examples : 
     'Clean up process started....' >> $log
    File name :'+ $files +'Time-Stamp: '+ $endtime +'Search complete.' >> $log 
    .i want to remove the extra spaces after each character but not all the spaces from the file. Thanks in advance.

    hi  mjolinor
    add-content is used to insert text it does not append text at the file .i used >> to append the text on log file ..
    from 
    Get-Help ADd-Content
    Synopsis
    Appends content, such as words or data, to a file.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to insert  blank spaces at end of a record

    Hi All,
    i need to write 10 records each of 80 char size. of these 10 records, each record might have different data and the last field will be a filler field which only has space.
    for example:
    DATA : BEGIN OF gs_mrecord        ,
             id(1)         VALUE'M'     ,
             accno(12)                  ,
             refid(2)      VALUE 'RR'   ,
             sec_cd(4)     VALUE '2437' ,
             sub_typ(1)    VALUE '6'    ,
             sub_dt(5)                  ,
             sub_seq_no(1)              ,
             sec_cd1(4)    VALUE '2437' ,
             sub_dt1(6)                 ,
             record_no(6)  TYPE n       ,
             ext_ind(1)                 ,
             plat_id(1)                 ,
             filler_1(1)               ,
             clear_code(3)              ,
             ex_merc_no(16)             ,
             filler_4(4)               , fill blank spaces
             mech_bin_no(6)             ,
             filler(6)             ,  " fill blank spaces
             END OF gs_mrecord .
    like this there are 10 types with 80 char size, however the last field is a filler, in which we need to fill only blank spaces.
    when i wrtie this data to the application server file i can't see the spaces and when download(to .TXT file) also i can't see the spaces.
    is there anyway that i can keep the spaces at the end of the record.
    Please note, in the middle of the record, we can keep the spaces as there is some data after that.
    Any hint would be of great help.
    Cheers,
    SR.

    Hi Srinivas
    Just a thought, try as below:
    Declare a text variable of length 80 characters. Before transferring the record to Output file, move the work area to the text field and add a New Line character at 80th position. Now tranfer this text field to file with length specification.
    Eg:
    DATA: l_cr(1) TYPE c VALUE cl_abap_char_utilities=>cr_lf,
          l_text(80) TYPE c.
    OPEN DATASET ....
    IF sy-subrc EQ 0.
       LOOP AT <itab> INTO <wa>.
          MOVE <wa> TO l_text.
          l_text+80 = l_cr.
          TRANSFER l_text TO <dsn>.
       ENDLOOP.
    ENDIF.
    Hope that helps, also check the codepage in which you download the file from Application server before Viewing. Maybe checking the file contents via AL11.
    Hope it helps.
    Regards
    Eswar

  • Blank Space problem in Adobe Form

    Hello Gurus,
    In my Adobe form, One field has to be displayed based on a condition. So, for that field, in Context tab, condition is specified and its working also i.e. It condition is true then data is not displayed in the layout but I find the blank space for it. I dont want that blank space to be displayed.
    Example:
    In layout, address is in format as shown below.
    Name
    Street
    City
    Region
    Postal code
    Country
    Here, I have a condition that, Region field should not be displayed only for Material eq '123' i.e. same address has to be printed as shown below.
    Name
    Street
    City
    Postal code
    Country
    But, If I give condition then address is shown as below.
    Name
    Street
    City
    >Here, am getting empty space & I dont need this blank space to there in the layout.
    Postal code
    Country
    So, Can anyone please help me for this.
    Thanks in Advance.
    Regards,
    Usha

    Hi Usha,
    1. Remove the Condition from you Context tab.
    2. In the Driver Program check for the condition and fill the value in the internal table which is passed to
        the adobe form.
    3. Make the subform (under which the field is added in the hierarchy view) as flowed.
    4. In the script editor, Select the 'javascript' and write the script to hide the form field specifying the condition here.
    for e.g
    if (xfa.form.FORM.SUB_FORM.matnr == "123") {
        xfa.form.FORM.SUB_FORM.Region = "hidden";
    NOTE: Javascript is Case sensitive and stops working immediately after the line of code where an error occurs.
    Hope this proves to be useful.
    Thanks,
    Swar.

  • Check for a Comma (,) in an address field and send tht (,) as blank space t

    Hi,
    I have requirement , where I'm supposed to check for a Comma (,) in an address field and send tht (,) as blank space to the workarea.
    Do we have any FM or any check method for this.
    Plz tell me.
    Rohini.

    Hi,
      say address fields is "v_addr"
    DATA : v_len TYPE I,
               v_cnt1 TYPE i,
               v_cnt2 TYPE I value 1.
    v_addr = 'adresss,fiedls '.
    v_len = strlen( v_addr ) .
    DO v_len TIMES.
         IF v_addr+v_cnt1(v_cnt2)  EQ ','  .
             v_addr+v_cnt1(v_cnt2) = ' '.
            v_cnt1 = v_cnt1 + 1.
         ENDIF. 
    ENDDO.

  • Blank Spaces in TDMS file Properties

    hi,
    I want to re write the property  (in labview )" Storage date/time  "   with the actual value(datetime)
    but what does diadem expect the property name to be  as    it doent accept  blank spaces  etc (converts everything to "_"         
    is there any trick for this  how to insert  the propertyname.
    names without  blank r not an issue

    Hi aparab,
    Check out this white paper that talks about this property and lots of other points regarding writing TDMS files with LabVIEW that work well with DIAdem and the DataFinder.
    http://www.ni.com/white-paper/14252/en/
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

Maybe you are looking for