How to handle comma in the string

I need compare a string in HTMLDB report, as
Select HOST, MODEL
From hwrpt
WHERE MODEL= :P3_MODEL
Since most IBM models has 'IBM, XXXX-YYY' syntax for P3:_MODEL, the query failed. I tried to use single/double quoe but failed too.
Is there a function/syntex I can use to handle comma in the string?

You need no special quoting because there is a comma in the text string. I was able to do the following:
1) Created a table named HWRPT with columns HOST and MODEL.
2) Inserted one record with the value of IBM, XXXX-YYY in the model column.
3) I created an unconditional branch back to page 2. I created a SQL Report region with the following Select: Select HOST, MODEL From hwrpt
4) Created a Text item P2_MODEL on page 2.
5) Added the following text to the SELECT statement for the report region: where model = :p2_model
6) Ran the page and put IBM, XXXX-YYY in P2_MODEL and pressed the ENTER key.
7) The row was displayed.

Similar Messages

  • How to handle comma in DMEE when your file format is CSV

    Does anyone knows how DMEE handles comma when its part of the field value and when the file format requirement is CSV?
    Thanks all in advance.
    Aloy

    Wrong forum.
    You should be here.
    Oracle Application Express (APEX)

  • How to handle comma separated values in OLE DB Source query for a parameter variable from XML file in SSIS

    Hi,
    I am using OLE DB Source to fetch the records with Data Access Mode as SQL COMMAND which is using the below query with a parameter,
    SELECT CON.Title,CON.FirstName,EMP.MaritalStatus,EMP.Gender,EMP.Title AS Designation, EMP.HireDate, EMP.BirthDate,CON.EmailAddress, CON.Phone
    from HumanResources.Employee EMP INNER JOIN Person.Contact CON ON EMP.ContactID=CON.ContactID WHERE EMP.Title in (?) 
    In this query for the parameter I am passing the value from a variable and which is configured (XML Configuration). While passing value
    Buyer it works correctly. But while passing values Accountant,Buyer
    it is not working as expected.
    How to handle while passing such multiple values Or is it possible to pass such values or not in SSIS 2012 ?
    Kindly help me to find a solution.
    NOTE: I placed the whole query in a variable as a expression as below it is working fine.
    "select CON.Title,CON.FirstName,EMP.MaritalStatus,EMP.Gender,EMP.Title AS Designation,EMP.HireDate,EMP.BirthDate,CON.EmailAddress,CON.Phone from HumanResources.Employee EMP
    INNER JOIN Person.Contact CON ON EMP.ContactID=CON.ContactID WHERE EMP.Title in ('" + REPLACE(@[User::temp],",","','")  +"')"
    Any other solution is there ? without placing the query in a variable. May be a variable can have some limitations for no. of characters stored not sure just a thought.
    Sridhar

    Putting the whole thing into a variable is certainly a valid solution.  The other involves putting the comma delimited list into a table valued variable.
    http://gallery.technet.microsoft.com/scriptcenter/T-SQL-Script-to-Split-a-308206f3
    For an odd ball approach: 
    http://www.sqlmovers.com/shredding_multiline_column_using_xml/ .
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • How to find out whether the String contains chinese characters

    I need to check if the string contains chinese characters in Java. Does anyone know how to do it? thx.

    Since Java strings contain UNICODE code points, check the content against the relevant page here - http://www.unicode.org/charts/ .

  • How can I find out  the strings that will be presented to the UI

    Hi All,
    I am working on a Swing based application (Swing based UI)
    I am requested to do the following on the bytecode of that application:
    I am supposed to find out what strings from within that bytecode will be presented to the UI and what will be used for an internal usage.
    i have no way of running the application to verify that, i can only work on the static bytecode files.
    hard question ha?
    Thanks,
    EItan.

    You would of course have to run it. Either via a VM or recreating a VM yourself.
    As an example of that how would you figure out what string occurs in the following (pseudo) code?
    String msg = (cnt > 1) ? ("files=" + cnt) : ("file=" + cnt);
    if (cnt > 1) DisplayMessage(msg);

  • Sql report on item - problem with commas in the string

    I have a simple report that groups all the Job Titles entered on our database.
    I pass the job title to an apex item and then on a second page list the records that match that job title using:
    and ed.ede_job_title = :P35_JOB_TITLE
    If there is a comma in the job title the report returns the records that match the string up to the point the comma appears not the full string.
    So 'Project Manager, Operations' matches all the 'Project Manager' records.
    Also when there is a leading space in the job title the report displays the jobtitle without the leading space.
    Apologies if this is answered elsewhere, I did search.

    Check the actual URL up in the location bar. Your comma may actually be dropping out there, because it isn't encoded such that in value commas can be differentiated from delimiters, so the fields aren't lining up in the URL properly.
    When you go to a page that takes in parameters for assignment in the link, it has 2 fields. The first is the comma separated list of the item names on the page to assign, which wouldn't contain commas in their names. The other field in the URL is a comma separated list of values to be assigned to the previous list. Since these values aren't encoded, the comma in the value is picked up as delimiter and not a part of the value. I have an example I can load up to apex.oracle.com if you need.
    -Richard
    Edited by: rwendel on Aug 13, 2009 11:51 AM

  • How to handle in LSMW the validation if 01 and 35 for two values

    in lsmw if we are having in flat file as 01 one entry and other 34.
    size of the field is only two character .
    As of now iam checking to put 0 before one if the value 01 however iam
    getting problem in the case of 34
    case 1 ) if iam having 01 the below code works perfectly
    Concatenate '0' flat_0034  into flat_0034.
    case 2) if iam haivng in the flat file as 35 the code
    concatenate '0' flat_0034  into flat_0034 going into wrong
    as in front of the value
    could any one please let me know how to handle this scenario.
    regards
    syamla

    Dear Naresh Nelapatla 
                   Can you please give me validation example please as it is little urgent.
    thanks &regards
    syamla

  • How to identify end of the string is ABAP

    Hi friends,
         While I am doing an operation on a string, I want to identify the end of the string. In C we have <b>\0</b>. But in SAP how can we identify that we have reached the end of the string.
    Sathish Reddy.

    use this function and get there 1st character
    CALL FUNCTION 'STRING_REVERSE'
         EXPORTING
              STRING    = ZFNAME
              LANG      = SY-LANGU
         IMPORTING
              RSTRING   = ZFNAME
         EXCEPTIONS
              TOO_SMALL = 1
              OTHERS    = 2.
    IF SY-SUBRC EQ 0.
      WRITE:/ ZFNAME.
    ELSE.
      WRITE:/ 'ERROR REVERSING STRING'.
    ENDIF.

  • How to handle event when the user closing the browser (Urgent Please)

    Hi,
    How to handle the event when user closes the browser....
    i want to display some alter message when user trying to close the browser...
    Please can any one help me how i have to do this...........
    Thanks.

    Finally got this working. You cannot use the stop() or destroy methods. By the time they are called all database connections are gone and you will get a null pointer exception.
    You will have to use the onBeforeUnload method in the html file that calls the applet and use JavaScript to call the save method in java which saves the document:
    <SCRIPT LANGUAGE="JScript" TYPE="text/javascript">
    function Save()
    //i call the applets doSave() method from here in which i save all
    //changes to the database
    top.Tree.document.TestApplet.doSave();
    //this will invoke the default IE message for closing the window
    //when user clicks on the x in the browser
    message = "Your document has been saved."
    return message;
    window.onbeforeunload=Save;
    </SCRIPT>
    //the applets doSave()
    public void doSave()
    //this frame provides user with the message that document is being
    //saved
    final JFrame frame = new JFrame("Saving");
    JPanel contentPane = new JPanel();
    JLabel label = new JLabel(" Please wait, saving document...");
    frame.getContentPane().add(label,BorderLayout.CENTER);
    frame.setSize(250, 100);
    frame.setLocation(300, 400);
    frame.setResizable(false);
    frame.setVisible(true);
    frame.addWindowListener(new WindowAdapter()
    //the frame is just for user's information, so prevent user from
    //closing it or iconifying it.
    public void windowClosing(WindowEvent e)
    frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    public void windowIconified(WindowEvent e)
    frame.setState(frame.NORMAL);
    //call my saveDocument() method that saves everything to the database.
    editorModule.saveDocument();
    //System.out.println("finished calling saving document");
    //once the saving is done the frame with the message disappears
    frame.setVisible(false);
    //System.out.println("setting frame to false");
    //I also had an exit button in my applet, that would perform the same task, however now with the above onBeforeUnload method, the exit message would appear twice, so had to modify my exit button action performed, so that if the exitbutton was clicked the onbeforeunload method would get passed a null value and not do anything.
    private void exitButton_actionPerformed()
    if (DEBUG) System.out.println("Calling exit");
    doSave();
    window.eval("this.onbeforeunload=null;");
    window.eval("top.close();");
    //continue from here if user cancels the closing of the window
    window.eval("this.onbeforeunload=doSave;");
    window.eval("top.focus()");
    window.eval("document.TestApplet.requestFocus()");
    homePanel.requestFocus();
    }

  • How to calculate length of the string in transformation file

    Hello all
    I have tried a number of ways and I am not able to calculate the length of the incoming field in transformation file for my data load. Here is the issue.
    I have an incoming string of length 10 and I need to use it to update multiple dimensions which will need first 2, 4 ,6 , 8 characters respectively.
    Now in transformation file ID=ID(1:2) works perfect. However, the BW InfoObject will have multiple values as shown below:
    ID
    Description
    AB
    Business
    ABCD
    Business Organization
    ABCDEF
    Business Line
    ABCDEFGH
    Product Family
    ABCDEFGHIJ
    Product Line
    ABCDEFGHIJKL
    Brand
    I want to update my dimension for Business Organization. I need to update only the records where the length of the incoming string is 4. If I do ID(1:4), I will get the duplicate records and will see the ID less than 4 characters in rejected records. The latter is not such a big issue but the former one is as I need to fetch the right description as well. The formula should check the length and then only pass the record else a dummy value.
    A formula to achieve this in the transformation file is what I am looking for.
    Regards
    Gajendra

    Thanks Vadim for the quick response!
    I am also trying something similar and really appreciate your input here. However, I am not sure if the conversion is really happening.
    Here is what I have done:
    But the strings <> 4 in length are still passing through.

  • How to handle comma present in any filed while loading CSV file in APEX

    I am trying to import excel sheet data into a table. I have followed steps mentioned in below link and they work just fine with one exception.
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Exception is related to presense of comma (,) in any particular filed like- Address.
    How can I handle this situation? I am using APEX 3.2
    Thanks,
    Abhi

    Yes this is correct.
    but problem will occur when e.g check the foll. string.
    (1001,And I quote "This, will work")
    Here it is a comm(,) in b/w "This and will".
    due to this sqlldr interpret it as end of field. and throws an error.
    I had gone through expert one on one oracle, what it maintioned as,
    put an extra double quotes( " ) like " " to enclosed the double quoted string.
    This works fine. For small data it can be done manually.
    But for large data what condition can be put in the ctl file to achieve this?
    or is there any other way to achieve this?
    Thank you.

  • How to get pixes of the String  ?

    In Stirng Object ,it'a provide String.length() to get the length of String ,But I tried to get the pixes of this Stirng . How can I do that?
    Best regards.

    Sorry,I would not describe this clearly.
    Exapmle we use below methed:
    public void paint( Graphics g )
    g.drawRect( 100,100 , 10, 10 )
    It's will paint a Rectangle with 10 "pixes" width and 10 "pixes" height on itself component .

  • How to handle comma while importing CSV file in APEX 3.2

    I am trying to import excel sheet data into a table. I have followed steps mentioned in below link and they work just fine with one exception.
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Exception is related to presense of comma (,) in any particular filed like- Address.
    How can I handle this situation? I am using APEX 3.2
    Thanks,
    Abhi

    Wrong forum.
    You should be here.
    Oracle Application Express (APEX)

  • How to use "SPLIT" on the string

    Hi,
    i am using split on an internal table  where the field in the table is a string.
    the following is the code.
    TYPES:BEGIN OF IT_MAT,
         MATERIAL TYPE STRING,
         END OF IT_MAT.
    DATA IT_MATERIAL TYPE IT_MAT OCCURS 0
         WITH HEADER LINE.
    and after populating the internal table with some string values
    i am using this statement:-
    split it_material at '|' into it_result_table-field1  w_remaining.
    Here i am getting an error message saying that it_material must be a character-type data object.
    please help me out in this
    thanks
    kumar

    Hi kumar,
    Please check this thread by clicking on the below link. It will solve ur problem.
    Re: how to Split a String ?
    Regards,
    KK

  • How to handle Changes in the Structure of Outbound Message.

    Hi Experts,
    I have a File2RFC scenario where the Outbound Message fields are (for e.g,) ID,Name,Loc, and Status. The structure of the xml file which needs to be picked by sender file adapter is changing each time based on the data entered by the user. I am sure this will fail in IS with RuntimeException in Message-Mapping transformation Error. Is there anyway to handle this kind of situation.
    Message Sample- 1 (Message Processed successfully as it contains all the 4 fields...)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Send xmlns:ns0="http://File2File">
       <root>
          <ID>1234</VesselID>
          <Name>PIUSER</VesselName>
          <Loc>System A</Type>
          <Status>1</Status>
       </root>
    </ns0:MT_Send>
    Message Sample-  2 (Message Failed with Runtime Mapping Exception in IS...'Loc' is missing)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Send xmlns:ns0="http://File2File">
       <root>
          <ID>5678</VesselID>
          <Name>SAPUSER</VesselName>
          <Status>2</Status>
       </root>
    </ns0:MT_Send>

    Hi Ravi,
    Thanks for the reply. I think changing the cardinality will not solve this issue. Because the file which is being picked by Sender file Adapter is changing its structure everytime based upon the values entired by the user.
    For example - In Message 1 User has entered all the 4 values...so the structure is full.
    Message Sample- 1 (Message Processed successfully as it contains all the 4 fields...)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Send xmlns:ns0="http://File2File">
    <root>
    <ID>1234</VesselID>
    <Name>PIUSER</VesselName>
    <Loc>System A</Type>
    <Status>1</Status>
    </root>
    </ns0:MT_Send>
    In Message 2 - user has entered only 3 values...Though I have kept Loc as 0 to Unbound it fails as there is no tag <LOC></Loc> here.
    Message Sample- 2 (Message Failed with Runtime Mapping Exception in IS...'Loc' Tag is missing)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Send xmlns:ns0="http://File2File">
    <root>
    <ID>5678</VesselID>
    <Name>SAPUSER</VesselName>
    <Status>2</Status>
    </root>
    </ns0:MT_Send>

Maybe you are looking for

  • Calculated Key figures using different key figures

    Hi All, I want to create a calculated key figure based on Actual and Plan.Actual values are coming from InfoCube,Plan values are loaded from Excel sheet into different key figure in another infocube.I've created a MultiProvider for these Cubes.Now I

  • Is it possible to use a DateDiff formula within a single field?

    Post Author: EarthMover CA Forum: Formula I have a field that lists transaction times for the signing on and off of maintenance tickets. My problem is that since both the sign-on and the sign-off are in the same field, I don't have the option of usin

  • Get Length of Child Elements

    I have an element called <Transaction>. This element has child elements within it. How can I get a length or count of how many child elements are within the <Transaction> element using PL/SQL? Thanks Jennifer

  • MS Publisher crossover to IMac

    I am hoping that someone can assist me on this issue. We recently changed to an IMac Leporad, mainly due to it's superior abilities for Photoshop use. However, we have been using MS Publisher and would like to find either something that we can use th

  • 250MB expires in 30 days?

    So if I sign up for the 250 data package and I do not use the entire 250 within the 30 days does it go bye bye? And I say do not renew monthly. And along with that if I sign up for the repeating subscription and I dont use all my data does it add ano