Multi line pattern search with like

Hi All,
I am using oracle 9i. I want to search for multi - line pattern.
for e.g.
update tablename
set columnname .
I used select * from user_source where text like '%update tablename%set columnname%' but this only seem to work if update tablename set columnname is in the same line .
Thanks.

Well, no wonder it does not work. USER_SOURCE stores one line of text per row, so column text by definition can not contain multi-line strings . One solution could be analytic function LEAD:
SQL> create or replace
  2    procedure p1
  3      is
  4      begin
  5          update emp
  6             set ename = ename;
  7  end;
  8  /
Procedure created.
SQL> select  distinct name
  2    from  (
  3           select  s.*,
  4                   lead(text) over(partition by name order by line) next_text
  5             from  user_source s
  6          )
  7    where text like '%update emp%'
  8      and next_text like '%set ename%'
  9  /
NAME
P1
SQL> SY.

Similar Messages

  • Formatted Search with like

    I'am tring to do a Formatted Search with this: SELECT     DISTINCT T0.Code, T0.Name
    FROM         T0 LEFT OUTER JOIN
                      ORDR ON T0.Name = ORDR.U_PDischar WHERE T0.Name Like '$[ORDR.U_PDISCHAR] %%' ORDER BY T0.Name
    but it not work any help... thanks
    Message was edited by: Juan F Vásquez

    Hi,
    This worked for me:
    SELECT DISTINCT T0.Code, T0.Name
    FROM T0 LEFT OUTER JOIN
    ORDR ON T0.Name = ORDR.U_PDischar WHERE T0.Name
    Like $[ORDR.U_PDISCHAR] + '%%'  ORDER BY T0.Name
    Not whit this same fields, but with others.
    Hope helps,
    Ibai Peñ

  • Search with LIKE on Long datatype

    I'm running a query on Oracle 10g on the 'dba_triggers' data dictionary view
    I'm getting ORA-0093: inconsistence datatypes: expected NUMBER got LONG
    What should I do to fix the syntax to make like words with long
    SELECT *
    FROM DBA_TRIGGERS T
    WHERE T.trigger_body LIKE 'ABC%'
    ---

    Use this approach
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:315118200346261192

  • How to achive multi-line editing (CRUD) with a table-UI on a ejb-model

    Hello community,
    i'm working on an prototype. we want to migrate an existing web-application to nw 7.1 with web-dynpro as ui-technology. the old application often uses javascript-/ajax- driven table-grid-controls. this table controls allowed editing the data in it. the conrol "records" every action. for example which rows were deleted, which were updated and which were appended.
    when the user has finished editing, he simply clicks a save-button. the table-grid control then sends the changes via ajax-calls to the server.
    now i want the achive such behavior in web-dynpro (7.1)
    for getting the data to be edited, i wrote an ejb and created an ejb-model in web-dynpro. so viewing the data works fine so far. the view-controller with the table-ui-element is bound to the view-controllers context, which is mapped to the context-controller to which again a model-object is bound, which retrieves the data from the ejb.
    inserting, updating and deleting single rows with a detail-view-controller also works, using additional context nodes (again mapped to addtional model-classes for crudp.
    but i know want to have all rows and cells to be editable. the user should be able to insert, update and delete in that table without neccessarily using a detail-view-controller.
    how would you achive this? holding every creates, update, deletes in single nodes? and when clicking a button to fire the save action to go to that nodes and apply that action? Or would you create an addtional flag-attribute in the node that shows what was done with that row? after pressing save also iterating the nodes, checking for the flag and doing the appropriate actions (but this maybee is performance critical when having a lot of rows)?
    any ideas how to achieve multiple crud-operations on a context-node, viewed with a table-ui-element would be welcome.
    regards
    Matthias

    Matthias,
    Let's address your questions one by one.
    1. You can make the table cells editable by chosing 'InputField' as TableCellEditor.
    2. Since you have bound your table to 'View Context' and 'View Context' to 'Component Context', all changes made by you in table will be visible in Component Context after every round-trip to server.
    3. To modify the data in 'backend', you need to modify your 'Save' method to check for every changed element and modify the data only if element was changed by user. To see if the element has been changed by user, use [IWDNodeElement.isChangedByClient()|https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/IWDNodeElement.html] method. This method returns true if element was changed by user - this is what you need.
    To learn more about WD Table UI element, you may want to see [this link|http://help.sap.com/saphelp_nw70/helpdata/en/eb/220a415a47f06fe10000000a1550b0/frameset.htm].   
    Hope this helps.
    Vishwas.

  • Help with Like Prepared statement

    Hi,
    Below is a part of the code in my test application which I am using for searching the phone book.
    I want to do a pattern search with like, but for some reason, my code is not fetching me the results.
    It just gives Zero results.
    But if i use "=" it works fine.
    I have highlighted the important part
    Can you please guide me to correct this code ?
    public class DBprgm {
    ResultSet result;
    public ResultSet getSearch(String a) {
              try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:source", "sa" , "");
    Statement st = con.createStatement();
    PreparedStatement ps = con.prepareStatement("select from friends where fname like ? ");*
    *String x = "%"+a+"%";*
    *ps.setString(1, x);*
    result = ps.executeQuery();
         catch (SQLException s){
              s.printStackTrace();
         catch (ClassNotFoundException c){
              c.printStackTrace();
         return result;
    }

    Your code leaks Connections! You create a Connection and never close it, that's a pretty bad idea.
    What database are you using? From a quick glance the code seems correct (apart from the problem I mentioned above, of course).
    Edit: also, I see that you're using the JDBC-ODBC bridge. That JDBC driver has only very limited functionality and also has a few tiny bugs. Generally I'd strongly suggest that you avoid it and use your databases native JDBC drivers instead. Maybe that's also the problem here, but I can't say for sure.

  • Pattern search using Bex parameter in Crystal

    How to get the results using a Bex query filter for Pattern search with Crystal.
    While pattern search works fine with the variable defined in Bex analyzer but when I attach it to a Crystal report, it doesnt seem to work.
    Bex variable has input like "IBM*", which works fine with Bex analyzer but the same input via Crystal doesnt fetch data.
    Thanks in advance,
    Venkat

    Hi Ingo,
    I am aware of the Select Expert, but that will make the parameter to be created in Crystal, so its going to be filtering from the recordset returned by Bex.
    This tight dependency on Bex is making it difficult.
    Thanks,
    Venkat

  • UCCE 9.0 Agent Multi-Line Working

    As Agent Multi-Line working is a global parameter on the peripheral. Does any one know whether it is possible to switch off Agent Multi-Line working only for a subset of Agents?
    The first group of agents still want to keep their second line (non-ACD), for voicemail retreval, etc, but do not want to be placed on not ready. Trouble is, I also have Agents (on the same cluster) who want to keep multi-line working together with JAL and want to keep the ability for the second line to place the agent in not ready on the ACD line.
    Cheers

    This is a PG setting, so I don't see a way around it.  It's all agents or none.
    david

  • Is there a proper way to config multi-line text boxes so they're compatible with all/most browsers?

    I've got forms that use multi-line text-boxes and they work fine with IE and Chrome.  A user just discovered that in Firefox the fields don't wrap (it basically appears to be a large field but acts like a single-line).
    Is there a workaround/fix for this?

    Is the input text just some dummy text line e.g. "aaaaaaaaaaaaa...." without any spaces? Try by adding lorem ipsum sample text i.e. actual words with spaces between. It should wrap.
    Thanks, Ransher Singh, MCP, MCTS | Click Vote As Helpful if you think that post is helpful in responding your question click Mark As Answer, if you think that this is your answer for your question.
    Firefox 37.01 —Here's a screenshot of it not wrapping:
    (each of the above are 2 long paragraphs that are not wrapping and showing as 2 single lines.)
    And here's a screenshot of Text Box Properties (I've tried it with and without autocomplete and spell-check just for kicks).

  • Append table with multi-line cells to word report

    Hi,
    I am using LabView 7.0. I need to append table to word report and I am using Append Table to Report VI. My VI works fine as long as the table cells do not have multiple lines. For multiple lines, each line is put is a seperate cell in the word report.
    Is there a way to append multi-line cells to Word Report??? If not, any suggestions on how I can copy the multi-line table to Word report???
    Please kindly help!!
    Please see the attached document for details on the problem.
    Thanks,
    Mim
    Attachments:
    Table with multiple line cells.doc ‏33 KB

    Hi Mim,
    Yes I understood the multiple-lines part. I think the doc is the report you want. Correct ?
    The doc is generated with your VI without any modifications.
    I am using XP, Office 2002 SP3 and LV7.1
    Attachments:
    Verification Report.doc ‏39 KB

  • The color of text item with multi-line in web

    I tried to change the background color of text item with multi-
    line, but it does not work when I run in the web, if some body
    knows that, please give a hint.
    Thanks
    Frank
    null

    I tried to change the background color of text item with multi-
    line, but it does not work when I run in the web, if some body
    knows that, please give a hint.
    Thanks
    Frank
    null

  • Sdo_util.polygontoline on polygon with hole - multi line?

    If I run sdo_util.polygontoline on a polygon with hole I would expect it to return a multi line with gtype=2006.
    Is that right?
    It doesn't in this case:
    jot_test@johnot> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    jot_test@johnot>
    jot_test@johnot> CREATE TABLE polygon_test (
      2  what varchar2(100),
      3  geometry sdo_geometry);
    Table created.
    jot_test@johnot>
    jot_test@johnot> INSERT INTO polygon_test (what, geometry) VALUES ('polygon with 3 holes',
      2  MDSYS.SDO_GEOMETRY(2003, 2157, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,41,2003,1,51,2003,1,61,2003,1), MDSYS.SDO_ORDINATE_ARRAY(644507.868,753517.124,
      3  644631.7897, 753533.6922, 644611.409, 753534.591, 644610.6025, 753545.5654, 644533.3319, 753588.8677, 644508.545, 753574.04, 644489.2124, 753613.5921,
      4  644454.5051, 753632.781, 644448.097, 753629.818, 644443.393, 753638.8542, 644410.0624, 753657.0707, 644396.379, 753651.217, 644392.824, 753655.998,
      5  644403.559, 753660.6251, 644390.1554, 753667.9506, 644385.891, 753666.108, 644363.783, 753682.497, 644430.984, 753599.479, 644490.526, 753515.738,
      6  644507.868, 753517.124, 644422.11, 753642.465, 644407.545, 753636.233, 644403.653, 753641.432, 644422.426, 753649.114, 644422.11, 753642.465,
      7  644417.5533, 753621.438, 644432.735, 753628.312, 644435.627, 753622.475, 644420.7838, 753615.5539, 644417.5533, 753621.438, 644453.003, 753576.579,
      8  644436.343, 753599.448, 644471.478, 753620.606, 644518.412, 753525.872, 644493.611, 753520.131, 644453.003, 753576.579)));
    1 row created.
    jot_test@johnot>
    jot_test@johnot> SELECT sdo_geom.validate_geometry_with_context(geometry, 0.0005) FROM polygon_test;
    SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(GEOMETRY,0.0005)
    TRUE
    1 row selected.
    jot_test@johnot>
    jot_test@johnot> SELECT sdo_util.polygontoline(geometry) FROM polygon_test;
    SDO_UTIL.POLYGONTOLINE(GEOMETRY)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    SDO_GEOMETRY(2002, 2157, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1, 41, 2, 1, 51, 2, 1, 61, 2, 1), SDO_ORDINATE_ARRAY(644507.868, 753517.124, 644631.79, 753533.692,
    644611.409, 753534.591, 644610.603, 753545.565, 644533.332, 753588.868, 644508.545, 753574.04, 644489.212, 753613.592, 644454.505, 753632.781, 644448.097, 753629.818,
    644443.393, 753638.854, 644410.062, 753657.071, 644396.379, 753651.217, 644392.824, 753655.998, 644403.559, 753660.625, 644390.155, 753667.951, 644385.891, 753666.108,
    644363.783, 753682.497, 644430.984, 753599.479, 644490.526, 753515.738, 644507.868, 753517.124, 644422.11, 753642.465, 644407.545, 753636.233, 644403.653, 753641.432,
    644422.426, 753649.114, 644422.11, 753642.465, 644417.553, 753621.438, 644432.735, 753628.312, 644435.627, 753622.475, 644420.784, 753615.554, 644417.553, 753621.438,
    644453.003, 753576.579, 644436.343, 753599.448, 644471.478, 753620.606, 644518.412, 753525.872, 644493.611, 753520.131, 644453.003, 753576.579))
    1 row selected.I was expecting that to return gtype=2006 and I think that's causing me some problems which I now need to investigate further.
    If someone can confirm that it should be returning gtype=2006 then I'll get open a tar on metalink.
    Thanks,
    John

    sdo_aggr_union seems to know to make it a multiline...
    jot_test@johnot> SELECT sdo_aggr_union(sdoaggrtype(sdo_util.polygontoline(geometry),0.0005)) FROM polygon_test;
    SDO_AGGR_UNION(SDOAGGRTYPE(SDO_UTIL.POLYGONTOLINE(GEOMETRY),0.0005))(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    SDO_GEOMETRY(2006, 2157, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1, 41, 2, 1, 53, 2, 1, 63, 2, 1), SDO_ORDINATE_ARRAY(644631.79, 753533.692, 644507.868, 753517.124,
    644490.526,753515.738, 644430.984, 753599.479, 644363.783, 753682.497, 644385.891, 753666.108, 644390.155, 753667.951, 644403.559, 753660.625, 644392.824, 753655.998,
    644396.379, 753651.217, 644410.062, 753657.071, 644443.393, 753638.854, 644448.097, 753629.818, 644454.505, 753632.781, 644489.212, 753613.592, 644508.545, 753574.04,
    644533.332, 753588.868, 644610.603, 753545.565, 644611.409, 753534.591, 644631.79, 753533.692, 644518.412, 753525.872, 644471.478, 753620.606, 644436.343, 753599.448,
    644453.003, 753576.579, 644493.611, 753520.131, 644518.412, 753525.872, 644435.627, 753622.475, 644420.784, 753615.554, 644417.553, 753621.438, 644432.735, 753628.312,
    644435.627, 753622.475, 644422.426, 753649.114, 644403.653, 753641.432, 644407.545, 753636.233, 644422.11, 753642.465, 644422.426, 753649.114))

  • Multi-line Address With Blank Line

    Using the multiline address and the input conforms to the guidelines.
    1.     [Name]  [Department]
    2.     Firm   [Department]
    3.     [Dual_Address]   [Secondary_Address]
    4.     Primary_Address   [Secondary_Address]
    5.     CITY    STATE  ZIP  [ZIP+4]  [COUNTRY]
    6.     [ZIP]   [ZIP+4]    [COUNTRY]
    However, when passing address lines 1-5 to ACE where address line 1 is the name, address line 2 is 'C/O' information, address line 3 is the primary address, suite # is address line 4, and city/state/zip is address line 5, ACE is concatenating the primary address and suite and placing it in the address line 4. Thus, whenever the address prints on the bill I'm getting a blank line printing between my C/O line and my address information. I thought that the multi-line kept the data together as a complete address? Is this not correct? If not how would I then get rid of the blank that is being generated?

    Greetings Angela,
    I would suggest that you check the settings in the Multiline Style block for Address Standardization style. There are settings available here for combining address data. Verfiy which ones you have enabled. Also in this same block is a setting for Swap Address Line, which controls where blank lines will be moved for output.
    If you require more detailed information regarding this, I would recommend that you log an incident via the SAP Service Marketplace (service.sap.com), so that support can provide assistance with researching this issue.
    You will need your S-User login information in order to log an incident.
    When creating the incident, make sure to enter the component BOJ-EIM-COR so that your question is directed to the correct support team for << product name>>.  
    Rob Siegele
    Forum Moderator
    Technical Support Engineer 
    AGS Primary Support, Business User
    SAP America

  • Print JTable with multi line header

    I need to print a JTable with multi line header, I want to know if I can use the method jTable.print(int, MessajeFormat, MessageFormat) by manipulation of the MessageFormat. How I can manipulate it?
    Otherwise, How I can print this?

    hi again,
    To print pdf in a swing application you don't need servlet.jar.
    You'll only need itext.jar and a printer connected to your pc.
    Download the iText source code and unzip it. See the following classes:
    com.lowagie.tools.LPR and com.lowagie.tools.BuildTutorial. This latter is the main class of a swing tool that you can run.
    Silent Print:
    You have only to embed this javascript code in your pdf:
    writer.addJavaScript("this.print(false);", false);
                        document.add(new Chunk("Silent Auto Print"));Then, you have to send the document to the printer.
    Google : java print pdf
    http://forum.java.sun.com/thread.jspa?threadID=523898 or
    http://www.exampledepot.com/egs/javax.print/pkg.html for printing task.
    Under unix system, I used this:
                           String PRINTER = ...;
                   try {
                        String cmd = "lp -d " + PRINTER + " " + PDF_PATH;
                        Runtime.getRuntime().exec(new String[] { "sh", "-c", cmd });
                   } catch (Exception e) {
                                 //handle the exception
                                 e.printStackTrace();
                   }hth

  • Cell.text with multi line content

    Hello anybody.
    Here is my code .
    story_title = [[NSMutableArray alloc] init];
    scripture_location = [[NSMutableArray alloc] init];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    cell.text = [story_title objectAtIndex:indexPath.row];
    cell.lineBreakMode = UILineBreakModeWordWrap;
    cell.text = [scripture_location objectAtIndex:indexPath.row];
    return cell;
    How can i make multi line in single cell . My code is diplayed last array list content. The line break is not working.
    Please help me with example
    Nalan.

    Double click on the text box and look in properties. There are many different options there including text wrap.
    (of course I'm referring to a form field and not a bunch of text that was included in the original document)

  • Multi line field Navigation problem with ENTER key

    No trigger on the field. Multi line Property is set to true.
    The probleb is, when the cursor reaches in the multi line field. the contents of the field are hilighted/selected. So as it happens in Notepad or Word, if you select some already written text and press ENTER key the selected text will be replaced by carriage return so the selected data will be lost. Same is the case with multi line field. When field gets focus it selects the contents of field and when ENTER is pressed all the contents are deleted and a carriage return is placed.
    any solution?
    null

    Hi Nadeem,
    One work around is that you have store content of that multi-line field in to some other variable thru PRE-TEXT-ITEM and once again assign (based on some conditon) in POST-TEXT-ITEM.
    null

Maybe you are looking for