Match exact string

I´m trying to run this code that uses a string(ing) and a string array (splitwords).
I need to run all the string(ing) and if it matches the string from the string array does something with that original string.
Code:
StringBuilder builder = newStringBuilder();
ing = " " + ing + " ";
builder.Append(@"{\rtf1\ansi");
foreach (string word in splitwords)
if (Regex.IsMatch(ing, @"(?<![\w])" + word + @"(?![\w])"))
// for example put the word in UPPERCASE
builder.Append(ing);
builder.Append(@"}");
return builder.ToString();
With all the tests it runs ok, but if the word (in the splitwords) to match is "leite" and in the text it has the word "I need to run the string with the word leitelho in it"
he thinks it  matches the word "leite".
It returns "I need to run the string with the word LEITE lho in it"
How can I change my if condition to solve this problem?

Hi Leonor, 
This following line is incomplete;
ing = " " + ing + " ";
Try the following code, it COMPILES and runs in Visual Studio just fine. BTW, if the split function is to work, you need to
add a space between the words leite and
lho. What does this phrase mean???
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
namespace MatchExactString
class Program
static void Main(string[] args)
//Console.WriteLine("enter words seperated by space");
//string[] ArrayOfWords = Console.ReadLine().Split(' ');
String WordPhrase = "I need to run the string with the word leite << SPACE HERE >>lho in it";
string[] ArrayOfWords = WordPhrase.Split(' ');
String x = ReturnString(ArrayOfWords); Console.Writeline(x);
static string ReturnString(string[] someWords)
StringBuilder builder = new StringBuilder();
string ing = "leite";
string[] splitwords = someWords;
ing = " " + ing + " ";
builder.Append(@"{\rtf1\ansi");
foreach (string word in splitwords)
if (Regex.IsMatch(ing, @"(?<![\w])" + word + @"(?![\w])"))
// for example put the word in UPPERCASE
ing = word.ToUpper();
//builder.Append(ing);
//builder.Append(@"}");
}//end foreach
builder.Append(ing);
builder.Append(@"}");
return builder.ToString();
Noticed I have commented out the following lines;
builder.Append(... ;
Are you trying to return a JSON string ???
UML, then code

Similar Messages

  • How can I search for an exact string match in my emails?

    I was looking for an old email that I had about Re-Animator The Musical. So, in the search bar in the upper right corner of the Thunderbird window, I typed "re-animator". I got 59 hits, and the message that actually contained the string "re-animator" was 27th, when sorted by relevance. All of the other hits were emails which contained the word "animal" or "animals", which to me has nothing to do with "re-animator". I'm surprised that those were considered hits at all, much less that they were considered more relevant than the one message which actually contained the desired string.
    I actually tried three different searches:
    reanimator
    re-animator
    "re-animator"
    (i. e. the first two were without quotes and the third was with quotes). All three of these variations had the same problem, though, that messages containing "animal" were ranked before the message containing "re-animator".
    The desired message contained the word "Re-Animator" (with that capitalization and hyphenation), and also contained "reanimatorthemusical" as part of a URL that was mentioned in the message. So, I would have expected both the search with the hyphen and the search without the hyphen to have been good hits for this message.
    My question is: How can I tell Thunderbird to search for messages that literally contain the string I ask for, and not get "creative" with the matches, as it seems to be doing for some reason?
    (I'm using Thunderbird 31.3.0 on Mac OS X 10.9.5.)

    No, searching for:
    "Animator" musical
    still has the exact same problem: it still wants to find "animal" instead of "animator". Why?
    Yes, I had already read the support article you linked to, but I hadn't found anything in it about why Thunderbird would prefer "animal" over "animator", or how to disable this misfeature. Is there no better documentation for the search bar than that?
    (And the search for "Animator The Musical" didn't find my message, simply because my message didn't contain that exact string. It contained "I am on a waiting list for some musical tickets for Sunday, but I haven't heard back yet. It is a preview of The Re-Animator. ( http://www.reanimatorthemusical.com/ )." The search for "Animator The Musical" only had a single hit, your message in which you suggest searching for that.)

  • Exact String match when calling a recordset

    I have a CategoryID column, and a Cats column.
    The main catefory for that products is on CategortID, but the in the Cats column is a string of other categories that the item is listed in.
    The problem is that if the search is for category id 94, and the Cats column includes 194 the item gets shown.
    How so I create a recordset that only returns items that match exactly out of the sting.
    I am currently using
    WHERE (Categoryid = colname or (INSTR(Cats, colname) >= 1))
    Here is an example
    Item CategoryID = 139
    Cats = 187, 136, 194
    But searching for category id displays this item!
    Any help appreciated

    Instead of INSTR(), try using FIND_IN_SET()
    WHERE (Categoryid = colname or (FIND_IN_SET(Cats, colname) >= 1))
    FIND_IN_SET() is meant to be for strings, so it might not work. But it does look for a complete match in a comma-separated list. Make sure there is no space between the comma and number when stored.

  • Forcing an exact string match in searches

    Is there a way of using the Case Exact String and Case Ignore String plugins so I can ensure that the iPlanet directory server only returns exact matches to an LDAP client.
    e.g.the difference in
    ldapsearch "cn=Abc"
    ldapsearch "cn=ABC"
    I want to find only "ABC" and NOT Abc or abc or aBc and so on..

    You can accomplish this using extensible matching rules.
    By default, the cn attribute is not case-sensitive. You can search for a case-sensitive cn value with a search filter like:
    cn:2.5.3.15:=ABC
    This will use the 2.5.3.15 (Case Exact Match) matching rule on the cn attribute. Note that this search will not be indexed, however, and will take longer than a normal cn search for an exact value.
    You can find more information on extensible matching in RFC 2254 (http://www.ietf.org/rfc/rfc2254.txt).

  • SQL Error: ORA-01861: literal does not match format string

    Hello,
    I'm trying to do data mining on a web log which recorded one day web access information from a busy web server. I imported the data into Oracle Data miner, and created a table (WEBLOG). The idea is to create a new field, i.e. session, for the users so that each session could be thought as a representative of a user-intent (aka topic). Now based on this, data mining models would be used to cluster(group) the users based on their similarity. The first step is to prepare the data which involves using SQL queries. So first, all I did was to create a function for date and time. This is the following code I used,
    create or replace function ssndate(p_date in varchar2 default '03-01-18',
    p_time in varchar2)
    return number
    $if dbms_db_version.ver_le_10 $then
    deterministic
    $elsif dbms_db_version.ver_le_11 $then
    result_cache
    $end
    as
    begin
    return trunc((to_date(p_date||' '||p_time, 'dd-mm-yy hh24:mi:ss')
    - to_date('01-01-90','dd-mm-yy')) * (86400/2400));
    end ssndate;
    The function ssndate compiled successfully.
    The next step I took was to create a view through the following query,
    create or replace view WEBLOG_VIEWS
    as
    select (select ssndate(LOG_DATE, LOG_TIME) from dual) as "SESSION_DT",
    C_IP,
    CS_USER_AGENT,
    (CS_URI_STEM||'?'||CS_URI_QUERY) as WEB_LINK
    from WEBLOG;
    This was successful as well. The problem is in the next step where I try to do data grouping.
    create table FINAL_WEBLOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    For this, I got the error,
    Error starting at line 1 in command:
    create table FINAL_LOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    Error at Command Line:1 Column:7
    Error report:
    SQL Error: ORA-01861: literal does not match format string
    ORA-06512: at "DMUSER.SSNDATE", line 11
    ORA-06512: at line 1
    01861. 00000 - "literal does not match format string"
    *Cause:    Literals in the input must be the same length as literals in
    the format string (with the exception of leading whitespace).
    If the "FX" modifier has been toggled on, the literal must
    match exactly, with no extra whitespace.
    *Action:   Correct the format string to match the literal.
    I don't know where I'm going wrong with this.. the to_date function should be fine. In the data that I possess, the date and time are in no format. Example: 30118 and 0:00:09 respectively. If anyone has any clue about this I would be sincerely grateful for any help that I can get!! It's quite urgent..
    The Oracle version is 11.2.0.1.0
    Edited by: 975265 on Dec 5, 2012 5:31 PM

    975265 wrote:
    Ok.. Looks like I touched a nerve there. I apologize. I'm still a student, and this is the first time that I've tried something at this level. I'm still in the learning process, so I was hoping that someone could point me in the right direction in order to "fix" the data.Not so much touching a nerve as simply trying to implement a very very poor, but all too common, practice. Since you are a student (which we didn't know until this post) most people will cut you some slack. However, this little exchange should now be burned into your brain as you move forward. One of the very first rules of programming is to ALWAYS use the correct data types for your data. And along with that, never ever depend on implicit type conversions - always use the proper explicit conversion functions.
    And as a slight follow-on, when considering the appropriate data type, don't assume that just because we refer to a given element as a 'something number' that it is indeed a number. Telephone "numbers" are NOT numbers. U.S. Social Security "numbers" are NOT numbers. U.S. Postal Zip codes are NOT numbers. All are just character strings which, by convention, we limit to the same characters we use to represent numbers.
    And since this entire discussion came up around the representation of dates, you might want to take a look at http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/
    Now, go forth and be a smarter programmer than your peers.
    Edited by: EdStevens on Dec 6, 2012 6:12 AM

  • Pattern matching in String

    Hi,
    I want to do pattern matching using String. Here is my requirement.
    String file_name = (String)hash.get("DOCNAME"));
    file_name = file_name.replace("'","285745@");
    So, whereever I have '(apostrophe) I will replace it with pattern "285745@" and then at another jsp where I get this request parameter I do reverse as follows:
    String docname = (String)request.getParameter("doc_name").replace("285745@","'");
    Now I know replace function is not going to do this. It is just a indicative, for you to know what I want to achieve. which other java function / method i can implement to get the desired result.
    thanks,
    pp

    String file_name = (String)hash.get("DOCNAME"));
    file_name = file_name.replace("'","285745@");The problem here is that String.replace() operates only on char arguments, you cannot replace entire substrings with it.
    The String.replaceAll() method, on the other hand, operates on regular expressions. In many common cases (those in which the substring you want to find contains no characters with special meaning to the regular expression processor) you can use it exactly as you would String.replace() except that it operates on substrings.
    But regular expressions are much more powerful than that. The javadoc for the "Pattern" class has some information on how to use them. There is also a tutorial at http://java.sun.com/docs/books/tutorial/extra/regex/intro.html which you might find helpful.
    In the 1.4 edition of Java there is no longer any need to screw around with while loops and StringBuffers. Nearly any text processing operation can be done with regular expressions.

  • Exact string search

    i was wondering if there was a way to do an exact string search in a document.
    If i have a document that has punctuation i want to be able to find the document only if i query whith an exact string match, including stopwords and punctuations.
    if the query is
    select *
    from documents1
    where contains(OBJECT_VALUE,'{hello, world}') > 0
    I want only to return the documents that have exactly "hello, world" whith the comma included.
    If i add the comma to printjoins, it would work, But when i query for only "hello" it wont match "hello, world"
    basicaly im looking for something that does a normal search but then check if the exact string is in the match area.

    Try this
    select substr(&P, (INSTR(&P, CHR('32'), 1))+1, (INSTR(&P, CHR('32'), 1)))
    from dual
    &p is a variable
    I am sure this will help you in any of case
    chr(32) will return space, If you have any other thing except space then you just replace 32 with that ascii code. Such as for
    1(we)2 then query will be
    select substr(&P, (INSTR(&P, CHR('40'), 1))+1, (INSTR(&P, CHR('41'), 1)))
    from dual
    Try it and tell is it working fine

  • Using a SQL Query in an Alert and Matching a String

    I've created an alert in 12.0.4 using a SQL Query and the field that I'm trying to match is a string.  Originally the query returned multiple rows but when the alert still didn't fire, I modified the query WHERE clause to return only one row:
    NAME                                RESPONSE
    Are area lights working?            No
    My expression in the metric is RESPONSE.  In the Monitor I'm matching a string equal to No.  (Do I need double quotes around the matchvalue?  Single quotes?  No quotes?)  The metric is in the 15min scan group, the role is xMII Developers and I'm in that role. The monitor alert string is ' =  '.  Both metric and monitor are active and I've subscribed to the monitor.  Other alerts in the 15min scan group (all based on tag queries) are firing off properly.
    Why is nothing showing up in the Alert Log?
    David Macindoe

    David,
    Did you figure out the answer?  If not, I will try to find someone to address your question.
    Mike

  • No constructor in JFrame matches init (String)

    Hello,
    I am using Forte for Java 2.0 build 1160 to compile my Java code. Upon compilation I get the following error message:
    DemoShape.java [33:1] No constructor in JFrame matches <init>(String)
            super("DemoShape Applet");
            ^
    1 errorThe odd thing is this code worked before. Also, when I use javac in a DOS prompt, the program compiles and runs fine. What is causing this problem.
    My code is below. I cannot seem to find any error:
    //import the necessary java packages
    import java.awt.*;   //for the awt widgets
    import javax.swing.*;  //for the swing widgets
    import java.awt.event.*;  //for the event handler interfaces
    public class DemoShape extends JFrame
        //declare private data members of the DemoShape class
        //requires seven control buttons
        private JTextField xShapeText, yShapeText, messageText, fontSizeText;
        private JComboBox shapeTypeDrop, shapeColorDrop, fontTypeDrop,fontColorDrop;
        //declare the entry and display panel containers
        private Panel entryPanel;
        private Panel displayPanel;
        //panels to be within the grid
        private Panel row1, row2, row3, row4, row5, row6, row7;
        //declare public data members of the DemoShape class
        //constructor to initialize private data members
        public DemoShape()
            //call the superclass (JFrame) constructor with the name argument
            //this must be done first (as in C++)
            super("DemoShape Applet");
            //arrays of string to be used later in combo boxes
            //some are used more than once
            String fonts[] = {"Dialog", "Dialog Input", "Monospaced",
                                "Serif", "Sans Serif"};
            String shapes[] = {"Rectangle", "Round", "Oval"};   
            String colors[] = {"Black", "Blue", "Cyan", "Dark Gray",
                                "Gray", "Green", "Light Gray", "Magenta", "Orange",
                                "Pink", "Red", "White", "Yellow"};
            //get the content pane of the class we are in
            Container entire = this.getContentPane();
            entire.setLayout(new GridLayout(1,2));
            //create the entry panel and add it to the entire pane
            entryPanel = new Panel(new GridLayout(10, 1));
            entire.add(entryPanel);
            //create the display panel and add it to the entire pane
            //this will display the output
            displayPanel = new Panel(new FlowLayout());
            entire.add(displayPanel);       
            //initialize the 7 row panels
            row1 = new Panel(new FlowLayout(FlowLayout.CENTER));
            row2 = new Panel(new FlowLayout(FlowLayout.LEFT));
            row3 = new Panel(new FlowLayout(FlowLayout.LEFT));
            row4 = new Panel(new FlowLayout(FlowLayout.CENTER));
            row5 = new Panel(new FlowLayout(FlowLayout.LEFT));
            row6 = new Panel(new FlowLayout(FlowLayout.LEFT));
            row7 = new Panel(new FlowLayout(FlowLayout.LEFT));
            //entry panel code
            //add the form elements to the boxes
            //the first box should have the shape label
            row1.add(new JLabel("Enter Shape Parameters:"));
            //second box should have the shape type
            row2.add(new JLabel("Select Shape:"));
            shapeTypeDrop = new JComboBox(shapes);
            row2.add(shapeTypeDrop);
            row2.add(new JLabel("Select Shape Color:"));
            shapeColorDrop = new JComboBox(colors);
            row2.add(shapeColorDrop);
            //the third box should have the x coord
            row3.add(new JLabel("Enter X:"));
            xShapeText = new JTextField("200", 3);
            row3.add(xShapeText);
            row3.add(new JLabel("Enter Y:"));
            yShapeText = new JTextField("200", 3);
            row3.add(yShapeText);
            //fourth box should have the message header
            row4.add(new JLabel("Enter Message Parameters:"));
            //the fifth box should have the message       
            row5.add(new JLabel("Enter Message:"));
            messageText = new JTextField(25);
            row5.add(messageText);
            //the sixth box should have the font type      
            row6.add(new JLabel("Select Font:"));
            fontTypeDrop = new JComboBox(fonts);
            row6.add(fontTypeDrop);
            //the seventh box should have the font size
            row7.add(new JLabel("Enter Font Size:"));
            fontSizeText = new JTextField("12", 2);
            row7.add(fontSizeText);
            row7.add(new JLabel("Select Font Color:"));
            fontColorDrop = new JComboBox(colors);
            row7.add(fontColorDrop);
            //add the rows to the grid rows
            entryPanel.add(row1);
            entryPanel.add(row2);
            entryPanel.add(row3);
            entryPanel.add(row4);
            entryPanel.add(row5);
            entryPanel.add(row6);
            entryPanel.add(row7);
            //display panel code
            //debugging
            JLabel test = new JLabel("Display Output Here");
            displayPanel.add(test);      
            //set the size of the entire window and show the entire applet
            this.setSize(800,600);
            this.show();
        }   //end the DemoShape constructor
        //call the main class
        public static void main(String args[])
            //create an instance of the DemoShape class
            DemoShape DemoShapeRun = new DemoShape();
            //add the window listener to the applet
            DemoShapeRun.addWindowListener(
                new WindowAdapter()
                    public void windowClosing(WindowEvent e)
                        System.exit(0);
        }   //end main
    }   //end DemoShape class

    The problem must be something with the Forte configuaration because there is most definatley a JFrame(String str) constructor and you are calling Super as the first line in your constructor so I would check and make sure that Forte is using the right JDK, maybe its trying to use Java 1 and thats causing the problem, I'm really not sure I don't use Forte but I can tell you its not the code thats the problem.

  • HT1977 I'm a iPhone 4s and new iPad 3 owner.  I'd like the apps and organization I've invested in the iphone to be exactly transfered to the ipad.  Is this possible?  Will all the applications and folders match exactly?  Thank you for your help

    I'm a iPhone 4s and new iPad 3 owner.  I'd like the apps and organization time I've invested in the iphone to be exactly transfered to the ipad.  Is this possible?  Will all the applications and folders match exactly?  Thank you for your help

    Restore the latest iPhone backup you made to the iPad.

  • SQL LOADER and ORA-01861: literal does not match format string

    Hi,
    I've to load data through control_file(.ctl) into oracle table through sqlldr. Oracle 11g, win xp.
    as soon as I use - sqlldr dss/dss control=orders.ctl I get error or nothing.
    Text file that is generated after loading fails has the following error.
    Record 1: Rejected - Error on table ORDERS, column O_ORDERDATE.
    ORA-01861: literal does not match format string
    I have checked the format of data to be loaded into Orders table is like this : *1996-01-02.*
    I checked the format of data in my database by querying sysdate from dual i.e. 10-JAN-10
    I thought that changing its format might solve my problem so i tried this:
    SQL> alter session set nls_date_format='YYYY-MM-DD';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    2010-01-10but still i'm getting the same error. I've to load millions of data. how I can solve this issue.
    Please suggest.
    Thanks alot.
    Best Regads,
    Kam

    Hi,
    It's strange ....nobody knew it?. I think this type of load problem will be very common isn't it.... where date column data is in a different format than in the db i.e.
    How to change *1996-01-02* in the Control_file to make it able to load in the table where sysdate is like this: *11-JAN-10*
    Sample data to be loaded is :
    1|36901|O|173665.47|1996-01-02|5-LOW|Clerk#000000951|0|nstructions sleep furiously among |
    Desc Orders
    O_ORDERDATE NOT NULL DATEI have tested this by creating a test table and a test control file by omitting this O_ORDERDATE and then everything was fine, data was inserted but don't know how to load this DATE also.
    Also not able to understand about POSITION in the control file...?
    Regards,
    Kam

  • Error: ORA-01861: literal does not match format string

    Hi,
    I am doing a RFC-XI-JDBC scenario.
    In the CC monitoring , i am getting this error for the reciver CC:
    "Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. "TableNAMe"(structure 'STATEMENTNAME'): java.sql.SQLException: ORA-01861: literal does not match format string "
    Please guide me what can be the cause and how to solve it.
    Thanks,
    Puneet

    This is how my payload looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_JDBC_REC xmlns:ns1="https:namespace.scene3">
    <STATEMENTNAME>
    <TABLE_NAME action="INSERT">
    <TABLE>ggclgis</TABLE>
    <access>
    <VALVE_ID>12584</VALVE_ID>
    <EQUNR>122</EQUNR>
    <ERNAM>12122</ERNAM>
    <INVNR>1212</INVNR>
    <GROES>1212</GROES>
    <ELIEF>123</ELIEF>
    <GWLEN>21-jul-2008</GWLEN>
    <GWLDT>12-jun-2006</GWLDT>
    <SERGE>wqwqw</SERGE>
    <TYPBZ>wqwqwq</TYPBZ>
    </access>
    </TABLE_NAME>
    </STATEMENTNAME>
    </ns1:MT_JDBC_REC>
    Please tell me if it looks fine.

  • "Literal Match Doesnot match format string" error

    Hi All,
    i created a view based on the querry below.
    The view runs fine and gives me correct result.
    but when i add the view to report it trows me oracle error ORA-01861 which is literal match doesnot match format string.
    did anyone face this problem before.
    Please Help
    SELECT q, source, a_string_name, day_f, clock_time_from, clock_time_to,
              ongoing, closed,
              rejection,done,notdone
         FROM (SELECT   DECODE (q_id,2, 'LEDGER_TYPE',
                                'N/A'
                               ) q,
                        DECODE (source_code, NULL, 'NO SOURCE', source_code) source,
                        a_string_name, day_f,
                        TRUNC (TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                    'DD-MON-YY'
                                        || ' '
                                        || hr.clock_time_from,
                                        'DD-MON-YY HH:MI:SS AM'
                               'HH'
                              ) clock_time_from,
                          TRUNC (TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                      'DD-MON-YY'
                                          || ' '
                                          || hr.clock_time_to,
                                          'DD-MON-YY HH:MI:SS AM'
                                 'HH'
                        + 3599 / 86400 clock_time_to,
                        SUM
                           (CASE
                               WHEN try_dt >=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_from,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND try_dt <=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_to,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND user_id <> 'Inbound'
                                  THEN 1
                               ELSE 0
                            END
                           ) ongoing,
                        SUM
                           (CASE
                               WHEN try_finish_dt >=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_from,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND try_finish_dt <=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_to,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND ai.quit_point_id IN (5, 6)
                               AND user_id NOT IN
                                               ('Inbound', 'Nightly Maintenance')
                                  THEN 1
                               ELSE 0
                            END
                           ) closed,
                        SUM
                           (CASE
                               WHEN try_finish_dt >=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_from,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND try_finish_dt <=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_to,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND ai.quit_point_id IN (2, 4)
                               AND user_id NOT IN
                                               ('Inbound', 'Nightly Maintenance')
                                  THEN 1
                               ELSE 0
                            END
                           ) rejection,
                        SUM
                           (CASE
                               WHEN try_finish_dt >=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_from,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND try_finish_dt <=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_to,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND user_id <> 'Inbound'
                                  THEN 1
                               ELSE 0
                            END
                           ) done,
                         SUM
                           (CASE
                               WHEN try_finish_dt >=
                                      TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                           'DD-MON-YY'
                                               || ' '
                                               || hr.clock_time_to,
                                               'DD-MON-YY HH:MI:SS AM'
                               AND user_id <> 'Inbound'
                                  THEN 1
                               ELSE 0
                            END
                           ) notdone
                         FROM report.attempts ai,
                        report.log_hour hr,
                        report.client ta
                  WHERE ai.source_code = ta.agency(+)
                    AND ai.user_id <> 'InActiveAttemptsUser'
                    AND try_dt >=
                           TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1), 'DD-MON-YY')
                                    || ' '
                                    || '05:00:00',
                                    'DD-MON-YY HH24:MI:SS'
                    AND try_dt <=
                           TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1), 'DD-MON-YY')
                                    || ' '
                                    || hr.clock_time_to,
                                    'DD-MON-YY HH:MI:SS AM'
                    AND try_finish_dt >= try_dt
                    AND q_id = 2
               GROUP BY DECODE (q_id,2, 'LEDGER_TYPE', 'N/A'),
                        DECODE (source_code, NULL, 'NO SOURCE', source_code),
                        a_string_name,
                        TRUNC (TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                    'DD-MON-YY'
                                        || ' '
                                        || hr.clock_time_from,
                                        'DD-MON-YY HH:MI:SS AM'
                               'HH'
                          TRUNC (TO_DATE (   TO_DATE (TRUNC (SYSDATE - 1),
                                                      'DD-MON-YY'
                                          || ' '
                                          || hr.clock_time_to,
                                          'DD-MON-YY HH:MI:SS AM'
                                 'HH'
                        + 3599 / 86400,
                        day_f)

    Please re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • Pattern matching a string

    I'm trying to pattern match a string in java which has the following syntax:
    ENSMUS followed by one character which can be anything followed by 11 digits.
    I've done this in javascript using the following regex:
    var regex = /^ENSMUS(\w{1})(\d{11})$/;I'm slightly confused by the Java equivalent (having looked at the Pattern class in the API). Could anyone lend a hand please?

    ENSMUS followed by one character which can be
    anything followed by 11 digits.
    String s = ...
    boolean b = s.matches("ENSMUS.\\d{11}");Note that when matching an entire String, you don't
    need to provide a beginning (^) and end ($) in your
    regex. Also, you said "any character", this is not
    \w, but a . (a period). \w is a "word character".So I assume if it was a word character it would be
    String s = ...
    boolean b = s.matches("ENSMUS\\w{1}\\d{11}");I'll try it and see what happens. Thanks

  • FQL query text to search for exact string

    Hi
    we are using SharePoint 2010 with FAST search...
    I'd like to be able to search for this exact string that contains parentheses...  "(ABC)"
    I thought it would be:
    ManagedProperyName:"(ABC)"
    this returns results with just ABC ... it ignores the parentheses... i need to only show documents with "(ABC)"

    For exact query you can use  equals. For example MPName:equals("<term or phrase>")
    However, in your case the parenthesis is considered a special characters which are stripped off during document processing and at query time.

Maybe you are looking for

  • Having Trouble getting data from iphone 4 to itunes so I can ultimately transfer to 4s.

    Original itunes machine is dead, so I deauthorized all machines and authorized current machine and couldn't sync items from phone to machine. Apple then told me to uninstall itunes and reinstall, have done so but still can't get it to sync all items

  • My hp external display is not found

    Have been using HP w19b as an external monitor for almost a year.  I have a 2009 (late) 27" imac and am running 10.8.2.  My external monitor went to sleep and never woke up on Nov 11, 2012.  I don't think there were any new updates on this date.  Had

  • Opening a pages document in Word

    Hi there. I am mainly using Pages to edit documents that have been generated in Word by other computers. I have no problem opening and editing these files but when I am finished, is there a way of saving them so that I can email them back to the othe

  • Captivate 3 Inserted swf animations play fine but display on slide as very small

    Using Captivate 3 build 589. Opening an existing cp file. Each slide has a swf file on it, and an audio clip. When I select a slide to edit it, the animation no longer appears as taking up the entire slide size of 800 x 600. I need to add some highli

  • Edit or change the email label in contacts

    I have an Ipad 2 up to date. I notice that in some contacts I can change the label for emails or add a custom label where as others that field cannot be changed or edited. Can anyone help thanks Chris