Another Grep query

I have a style that is all small caps for a table of contents.  Part of the text being pulled through is text like c1900.  The "c" of the c1900 looks very silly in small caps, expecially with oldstyle numbers.  I want to try some GREP styling that will pick up the c and change it to a different character style.
Right now I have:
c\d
which picks up (I think) the c followed by a digit.  Problem is that it also formats the digit.
Any help appreciated.  What am I doing wrong?

What you need to find is a "c' which is followed by a digit -- a lookahead. Just to be sure, I'd include all four digits:
c(?=\d\d\d\d)
Oh, and I've seen the 'c' formatted in italics in cases like this.

Similar Messages

  • How to Copy RPT of one BEX query to another Bex Query

    Hi,
    I have a Crystal Report-A1 based on one Bex Query ZABC_1. I also have another Bex Query with same output and source named ZABC_2.
    Now i want the to copy A1 to A2 and have A2 referring to ZABC_2.
    The only difference between the 2 queries is the selection option paramenters.
    Please let me know any way forward on this.
    Points will be awared for useful replies.

    Hi Rajesh J Salecha,
    What I understood is like :
    You have two queries and both gives same results but one of the query having a parameter.
    You have one report which is using query1.  Now you want that report to be copied as Report2 and use Query2 instead of Query1.
    If the this is the issue, then you copy Report1 as Report2 and go in Database and change the Data source location to Query2.
    Hope this will help you.  If my understanding is wrong then give us the work flow.
    Thanks,
    Sastry

  • Spatial Query that uses Result of another Spatial Query

    Hi all,
    I am using the SDO_DIFFERENCE Operator to return the difference between a query window and an intersection geometry. This is fine and i get an object back that is cast to a STRUCT using the SDO API. I want then to use this (returned)object in another SQL query that uses the SDO_RELATE Operator. The problem is that i dont know what type it needs to be so that the SDO_RELATE operator will accept it as a valid argument. Has anyone done this before or seen anything like it? Any help will be very much appreciated.
    Keith.

    Thanks for your help,
    I have done the following steps, but i still dont understand why it doesnt work.
    CREATE TABLE val_results (sdo_rowid ROWID, result varchar2(1000));
    CALL SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('SHAPES','SHAPE','VAL_RESULTS');
    SELECT * FROM val_results;
    1 null     Rows Processed <3>
    2 AAARDDAAEAAAAA+AAA     13348 [Element <1>] [Ring <1>]
    3 AAARDDAAEAAAAA+AAB     13367 [Element <1>] [Ring <1>]
    SELECT shape_id,SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(c.shape, 0.005)
    FROM shapes c;
    3     TRUE
    2     13348 [Element <1>] [Ring <1>]
    1     13367 [Element <1>] [Ring <1>]
    If my rectangle and polygon is still invalid, can someone tell me why they are invalid. And how can i make them valid?
    Thanks.
    UPDATE:
    I have solved Polygon issue.
    In Spatial Developer's Guide it says:
    Simple polygon whose vertices are connected by straight line
    segments. You must specify a point for each vertex; and the
    last point specified must be exactly the same point as the first
    (within the tolerance value), to close the polygon. For
    example, for a 4-sided polygon, specify 5 points, with point 5
    the same as point 1.
    I have added a point to polygon which is same as first point. Now, it can find the point in polygon.
    INSERT INTO shapes VALUES (4, 'Polygon', SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY(306,193,130,441,489,653,88,183,442,354,306,193)));
    But, when i run this query again:
    SELECT shape_id,SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(c.shape, 0.005) FROM shapes c;
    4     13349 [Element <1>] [Ring <1>][Edge <4>][Edge <1>]
    3     TRUE
    2     13348 [Element <1>] [Ring <1>]
    1     13367 [Element <1>] [Ring <1>]
    it doesn't say TRUE like it did for Circle ??
    Edited by: WhiteScars on Jan 4, 2010 12:45 AM

  • Another RAW Query

    Hi There.
    Another RAW query. I have PS CS4 Extended 11. I have tried to open RAW (NEF) pictures from my NIKON D3100. I get the error message 'Could not complete your request because it is not the right kind of document'. I have tried downloading the latest update. I currently have Camera RAW Version 5.7.0.213. I have also downloaded the DNG converter but I still get the same error. I am using Windows 7 on a laptop.
    Please help, otherwise no RAW Photography for me!
    Regards Mike.

    You need at least ACR 6.3 and you can not get there with CS4.  You either have to upgrade to CS6 or CC, or use the latest DNG converter. 

  • CS4 Grep Query (it's finding too much)

    Hello.
    Help please with a GREP query.
    In the following example, the period after the word "be" should be after the closing parenthesis:
    WRONG: or not to be. (Shakespeare)
    RIGHT: or not to be (Shakespeare).
    So I've come up with the following:
    FIND: (\.)( \(.+\))
    REPLACE: $2$1
    Mostly that works. But if the paragraph contains two instances, it is finding too much. E.g., in the following paragraph:
    To be. (Shakespeare) Or not to be. (Shakespeare)
    ...the grep is finding right the way through from the first period all the way to the final closing parenthesis. I need it to stop after the first parenthesis.
    Can it be done? How?
    Thank you,
    Ariel

    Thank you! Just what I was looking for.

  • Pass the result of a SQL Query as table_name  for another SQL Query

    Hi All,
    How to pass the result of a SQL Query as parameter to another SQL Query
    Eg: I am doing the steps below.
    1) select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ'
    2) I want to pass the table_name from step 1 above as parameter to another query "select * from TAB1"
    Thanks

    Naveen B wrote:
    Hi All,
    How to pass the result of a SQL Query as parameter to another SQL Query
    Eg: I am doing the steps below.
    1) select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ'
    2) I want to pass the table_name from step 1 above as parameter to another query "select * from TAB1"
    ThanksYou should craete PL/SQL code with cursor which will accept a parameter and call that cursor inside the first one
    But if the first sql returns only one row, you can do it with simple sql code
    select * from (select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ')- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Need help with GREP query-Extract

    Hi folks,
    I'm trying to tighten up a GREP query I was able to piece together.
    This Find string allows me to find text within the <ex> tags and delete the tags themselves. The Change field then applies my Extract paragraph style.
    (?s)(<ex> *)(.+?)( *</ex>)
    What I need it to do is add a blank line above and below the extract. Can that be added to the string?
    TIA

    Yes, by changing to \r$2\r
    BUT, is this text already a paragraph? If it is, it would be better to add space before and after as part of the style. If it's not, I'm not sure that adding the returns in the same operation isn't going to change the text from which it is extracted as well, so you might want to search first for <ex>.+?</ex> and change to \r$0\r without changing the formatting, then run what you have now to change the format on the extract.

  • GREP query that changes to character format

    I am trying to create a GREP query that finds a single capital letter K surrounded by parenthesis -- like this: (K). I was able to get that far, so that in the GREP Find What I have \(K\)
    I need to change this to (K) with only the letter K changing to a different font or character style; the parenthesis need to remain in the same font as before, matching the rest of the paragraph. I see that I can change the format in the GREP dialog, but if I do, it changes the format of the parenthesis as well as the K. The font that I need to change the K to is a picture font.
    If anyone can help with a suggestion on this, I'd really appreciate it.

    Positive Lookbehind/Lookahead. This GREP expression
    (?<=\()K(?=\))
    does the trick. I've coloured the different parts: red is the lookbehind, green is the lookahead, black is regular text.
    In essence, it finds (selects) any capital K which is preceded and succeeded by parentheses. Replace with what you like -- the parentheses are not touched.
    It's useful to know there is also a negative lookbehind/lookahead. The expression
    (?<!\()K(?!\))
    will find any capital K except those surrounded by parentheses.

  • Another problem:  query in oracle

    Hello guys,
    I have a problem in a SQL code in a program that uses a Oracle connection.
    The code:
    public class ConBol {
         public void getDataBol() {
              String sql = "SELECT * FROM DOCUMENT_FISC  WHERE NRDOC_FISC = ?";
              try {
                   Connection conn = new ConnectionFactory().getConnection();
                   PreparedStatement stmt = conn.prepareStatement(sql);
                   stmt.setInt(1, 3969);
                   ResultSet rs = stmt.executeQuery();
                   System.out.println("here -- ");
                   while (rs.next()) {
                        System.out.println("---while--- ");
                        System.out.println(rs.getString(1));
                   rs.close();
                   stmt.close();
                   try {
                        conn.close();
                   } catch (SQLException ex) {
                        Logger.getLogger(ConBol.class.getName()).log(Level.SEVERE, null, ex);
              } catch (SQLException ex) {
                   Logger.getLogger(ConBol.class.getName()).log(Level.SEVERE, null, ex);
    }When my SQL is only "Select * from myTable", the resultSet get all the data and the "System.out" inside the "while", works, showing me the data.
    When I put a "where" on my SQL, the resultSet returns nothing, and the column that I ask, has items inside and the query should return me at least one row.
    I really don't know what more can I do to solve this problem.
    The server is Oracle 11g.
    I try in Windows 7 and Windows XP SP3.
    I try to use 3 diferent oracle drivers: ojdbc6.jar , ojdbc14.jar and class12.jar.
    I try Eclipse and Netbeans, PreparedStatement and Statement, table name and column name in uppercase and lowercase, with alias, with other users from DB and no one solve the problem.
    The data base connection is ok. When I copy and paste the SQL on the SQLDeveloper, the query works fine and show me results.
    The program don't give any errors or exceptions, but doesn't work when I have a "where something".
    If I put "where 1=1" he works fine.
    Any help??

    Artur,
    I make the tests that you ask me to do and it works!!!
    The value returned from the "select distinct" work when I put him on the original query.
    I just can't understand how can this work if the another value that I pass to the query exists in the table too.
    How can one value that exists, don't return me nothing?
    At least, now I can be sure that the code is alright.
    Thank's a lot friend, for you and JSchell. I will make more tests to try understand how this can happen.
    Edit: I try to count the rows of that table. In PLSQL Developer, the row count was 5860. In the java code was 4730.
    Can be out of memory in the resultSet?
    Edited by: Herick on Dec 29, 2009 2:34 AM
    Edit2: Forget what I said. I use the "Select count" and the resultSet came with just one result, so can't be memory problem.
    Edited by: Herick on Dec 29, 2009 2:39 AM

  • Can I pass a SAP query to another SAP query???

    Hi Friends
    In SAP Queries we can edit the existing query and we can save it as a new query. In the same way is there anyway to pass a query to another query? As per my knowledge, I don't think it is possible, I want give confirmation to my manager, before telling this to him, I want to reconfirm it from you experts.
    Please guide me.
    Regards
    Praveen

    No Rob,
    He is talking about SAP Queries only, but he is not aware of SAP, he is from Dot Net. Thanks for your reply.
    Regards
    Praveen

  • InDesign CS4 - simple GREP query

    I'm trying hard to get to grips with GREP. I'm struggling with what seems should be a simple find and replace query, and would like some help please.
    I want to search a book for instances of both;
    Fig.(followed by a standard word space), and
    Figs.(followed by a standard word space).
    I'd like to change the standard word space in each instance with a non-breaking space. Is it possible to create a string to do this in one search?
    MTIA
    Steve

    Hi guys, thanks for the suggestions, but still not quite working.
    Fred: your solution finds and changes "Fig. " and replaces the word space with a non-breaking space. However it doesn't find "Figs. "
    Jongware: your solution finds both, but 'adds' a non-breaking space after the word space, rather than replacing the word space.
    Steve

  • Updating from another table query

    I have tried a merge query and I think I am not doing this right or for what I want to accomplish, it will not work. Here is the problem:
    I have a lookup table
    create table lkp1(
    lkp_id number,
    lkp_name varchar2(100));
    and have a another table
    create table test(
    test_id number,
    lkp_id number,
    lkp_name varchar2(100));
    I am trying to pull in the lkp_id value from lkp1 table into the test table. I have the lkp_name field in the test table so that I can reference back to lkp1 so that I can pull in the lkp_id value. How would I go about doing this if the lkp_name field in test table has the value duplicated over many rows. For example 5 records in the test table might have the lkp_name of 'ORACLE', and its lkp_id from lkp1 table is 25. How do I populate the lkp_id in the test table with the value from the lkp1 table, without specfiying in the where clasue ...lkp_name = 'ORACLE'. There has to be a way. I tried the merge query, and WOW...I was really off.
    Please help!

    scott@ORA92> -- test data:
    scott@ORA92> select * from lkp1
      2  /
        LKP_ID LKP_NAME
             1 name1
             2 Oracle
    2 rows selected.
    scott@ORA92> select * from test
      2  /
       TEST_ID     LKP_ID LKP_NAME
            10            name1
            20            Oracle
            30            Oracle
    3 rows selected.
    scott@ORA92> -- update:
    scott@ORA92> update test set lkp_id =
      2  (select distinct lkp_id from lkp1 where lkp1.lkp_name = test.lkp_name)
      3  where exists (select lkp_id from lkp1 where lkp1.lkp_name = test.lkp_name)
      4  /
    3 rows updated.
    scott@ORA92> -- results:
    scott@ORA92> select * from test
      2  /
       TEST_ID     LKP_ID LKP_NAME
            10          1 name1
            20          2 Oracle
            30          2 Oracle
    3 rows selected.

  • GREP query for find/change operation

    Hi everyone,
    In the following line, there's a comma after the first name. This type of formatting is repeated hundreds of times on a number of pages so I need to use a GREP find/change query to remove the comma after the first name and replace it with a space.
    Firstname,Lastname,State
    I wondered if something could tell me what the GREP code would be?
    Appreciate any assistance.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    ..  it's also doing it for the second comma
    That's impossible. You must have entered something else than Scott's code.

  • How do I reference columns in a report query from another report query?

    In Apex 3.1 it is possible to generate a report on more than one query. I have read that these queries can be correlated, but I cannot find how in the documentation.
    I go the Shared Components and create a new Report Query:
    select * from dept
    Then I click Add Query and I add:
    select * from emp
    How do I correlate these two queries (I want to join emp.deptno to dept.deptno) and have a nice hierarchicle XML-file.
    Is it possible in Apex 3.1?
    Dik Dral

    Dik,
    This type of query can't be build. The two queries are independent, you can't reference values in the first query from the second query. However you can reference page and application items - which won't help you all that much with this scenario though. You could also try combining the two queries into one, and then take care of the proper presentation in your template.
    Regards,
    Marc

  • Can we call a bex query from result of another bex query?

    we have a requirement wherein client has asked us for bex reports
    in a BEX report
    multiple queries needs to be executed and the querues are dependent on their parent query
    i.e.
    result of query 1 works as input for query 2 and result of query 2 works as input for query 3..
    is it possible??
    kindly help.

    Hi,
    (If RRI is not exactly what you need)
    Eg. for a scenario where we want to display all positions of documents where at least one position in a document fits given cretaria. You can try it using query/prequery construction.
    In short:
    Create two querries:
    In the first query you set the criteria (the output will be a list of document nos that fits that criteria). For peformance reasons keep this query small.
    In the second query give restriction on document number (replacement path with the first query as a parameter).
    Regards, Leszek

Maybe you are looking for

  • Session TimeOut -Email

    Hi All, Recently, the last 5 days, everytime I sign in to my verizon email account at work I immediately get an error message that says "Session TimeOut your session has ended please sign in again" I'm running Windows 7 and have tried both IE8 And fi

  • Fitbit Activity to Health App Successfully Working

    I was able to get my Fitbit activity (total steps, total floors climbed, total distance walked, total calories burned, sleep, and weight). You will need to install the Jawbone Up app (purple icon) and the IFTTT app. Create accounts in both apps. Log

  • WHAT NOW?? My Ipod Nano froze.

    My ipod froze completely and I am unable to do anything with, other than watch it as the battery goes dead. I would much rather listen to my music now instead of having to wait. Could anyone help me? This has happened before.

  • Elements 12 organizer will not stay up, it crashes very quickly after boot, editor works fine. After

    What do I do for photoshop elements 12 crashing immediately after booting up. Editor works fine.

  • SAP Dashboard Design Startup Error "Could not load file..."

    I am using SAP Dashboard Design Departmental Edition 2011 (currently trial version). I have created an interactive dashboard with several selectors, graphs, and image components. I went to open it yesterday, and an error popped up that read "Could no