Hanging of withdrawals - new Para first line: double tab?

Hi all

Very limited experience with InDesign, so please forgive.

I have a template for Word I'm trying to reproduce in Indesign for a book project:

Screen shot 2013-04-19 at 17.20.03.png

I used the hanging indents here to separate the initials of someone from their speech in a transcript. Using a tab at the beginning I can achieve. However, in InDesign, I seem to have to use two characters of tab for each new paragraph - is it possible so that InDesign can behave in the same way as Word?

Screen shot 2013-04-19 at 17.20.58.png

Up to this point, I have follow-up 'Create a hanging indent': http://help.Adobe.com/en_US/InDesign/CS/using/WSa285fff53dea4f8617383751001ea8cb3f-6dbba.h tml

Any help much appreciated.

This must be one of the least useful help topics.

You need that a tab in the paragraph, between the initials and their speeches. Everything is managed through dashes, and it's best handles in a paragraph Style (a you actually need two styles if there is more than one paragraph per person), in the withdrawal and spacing screen in the style definition window.

The first paragraph, set the left indent value. Which is how long you want the text of the speech from the edge of the frame. Then set the withdrawal of first line to a negative value, the same number, so the initials are on hunting left in thypically. You can add spaces before or after the space here, too, if you want paragraphs spacing as they are in your first example. Now go to the screen of the tabs in the dialog box and define a left-aligned tab at the same position as the left indent.

For the following, your new style can be based on the first style, but the withdrawal of first line value of 0. It's the only thing you have to change here, but you can remove the tab if you want (or not, because at this point it will never get used).

If there is always at least two paragraphs, you can set the second style be the following Style for the first (in the general screen). If the number of points may vary, with two styles and put 'same style' as the next style for your second. If there is always a fixed number of paragraphs, you can create a style for each of them (according to them) and set the style in a rolling loop so the last paragraph has the style of the first paragraph as its next style. This way you can just typing away and do not testify to a style. Whenever you press the Enter key, the following style will be applied to the new paragraph.

As far as I remember, it really is the same way, we need to do it in Word.

Tags: InDesign

Similar Questions

  • InDesign automatically formatting the first line of text in a textbox?

    Hello

    My question looks very easy, but I can't find an answer anywhere.

    I like automatically formats the first line of text in a text box with the style of good character.

    I tried already different ways like GREP or styles nested.

    But I never had the right solution.

    I hope you can help me!

    See you soon,.

    Raphael Tebarts

    Well, it's not entirely "automagical", maybe someone knows better as well.

    1. you create nested Style special Para with the line Style.

    2. with grep \A[^\r]+ find all paragraphs in your text boxes and apply your new paragraph Style.

    For more information, take a look here:

    http://GraphicDesign.StackExchange.com/questions/37272/grep-apply-character-style-until-ca distribution-back

  • Re: update of the lines double

    Oracle 11.2.0.2
    Windows 2008

    I have this table (case_file) with lines double (case_number).
    I want to make the unique case_number across the table.

    For example, if I have two lines with the same case_number (225), I would change one of the numbers and record this case_number to the privious_case_number column.

    I'm looking for a way to write a script to automate the process.
    Any help will be appreciated.
    CREATE sequences case_id_seq
    start with 25;

    create the table case_file
    (case_id number not null, case_number varchar2 (25), privious_case_number varchar (25), modified_by varchar2 (50));
    INSERT into case_file (case_number, privious_case_number, case_id, modified_by)
    VALUES (case_id_seq.nextval, ' 220 ', ' 2002', "S/n");
    INSERT into case_file (case_number, privious_case_number, case_id, modified_by)
    VALUES (case_id_seq.nextval, '225', null, "S/n");
    INSERT into case_file (case_number, privious_case_number, case_id, modified_by)
    VALUES (case_id_seq.nextval, '224', null, 'PM');
    INSERT into case_file (case_number, privious_case_number, case_id, modified_by)
    VALUES (case_id_seq.nextval, '205', null, 'Controller');
    INSERT into case_file (case_number, privious_case_number, case_id, modified_by)
    VALUES (case_id_seq.nextval, '225', null, "S/n");
    When I run the sub query, I get this result, with 225 appear twice:
    Select * from case_file;

    26/2002 225 S/N
    27 220 2002 S/N
    28 DBA 225
    29 224 H
    30 205 supervisor
    31 DBA 225
    when I run the below script:
    SELECT case_number, COUNT (case_number) as Number_Of_Case_Number
    OF case_file
    GROUP BY case_number
    HAVING COUNT (case_number) 1 >
    I get this result
    CASE_NUMBER NUMBER_OF_CASE_NUMBER
    ------------------------- ---------------------
    3 225

    SQL >
    edited by: 868332 on 6 February 2012 13:23

    Hello

    Do you really need two unique numbers for each line?

    That unique case_numebr, first, see what the highest existing case_number and create a new sequence that begins after this point:

    CREATE SEQUENCE     case_number_seq
    START WITH     250;
    

    Always use this sequence when you set case_numbers in the future.

    Re - number existing duplicates:

    UPDATE     case_file
    SET     case_number          = case_number_seq.NEXTVAL
    ,     previous_case_number     = case_number
    WHERE     case_id         IN (
                         WITH  got_r_num     AS
                      (
                          SELECT  case_id
                          ,       ROW_NUMBER () OVER ( PARTITION BY  case_number
                                                              ORDER BY         case_id
                                         )  AS r_num
                          FROM    case_file
                      )
                      SELECT  case_id
                      FROM        got_r_num
                      WHERE   r_num     > 1
                     )
    ;
    

    The subquery got_r_num assigns numbers 1, 2, 3,... for all lines, in the order of case_id (the lowest case_id gets r_num = 1) with a separate set of kinds for each case_number. When there are duplicates, one of the lines with this case_number will keep this case_number, and all others will again be case_numebr_seq case_numebrs.

    Published by: Frank Kulash on 6 February 2012 16:37
    Initially missed the part about previous_case_number. (Make sure the "previous" spelling.)

  • First character left in file by reading the first line in text file

    When you use the function of reading text from a file file, I noticed that the 1st character is left in the file. I read the line correctly.

    When adding a 2nd line this character is in the file.

    Part vi code is attached.

    Any ideas?

    Thank you.

    Elik

    Can you attach a file of real data and tell us what you mean by "first character". The number of characters per line do you have?

    Can you tell us what you see in the modified file and what you expect to see.

    Everything seems good.

    1. Read you the first line and so the file pointer is just after the first line
    2. You set the size of the file at the end (seems unnecessary, because it does nothing). The file pointer is always right after the first line.
    3. You write the first line you read concatenated with a second line. It will be written on the current file pointer, i.e. after the existing line
    4. The first line is in the file twice, as planned.

    Setting the file size to the 'end' on an existing file does not have something useful. If you want to set the position of the file instead?

    Try to set the file position from and new data will be written at the beginning of the file.

  • Scan of a file only works on the first line

    Hello

    I'm new to Labview (see 8.6) and I'm running on this problem.

    I use the Scan of a file to get a certain amount of information for the installation of test.txt.  The data of the file looks like this:

    AAA 1

    BBB 2

    REC 3

    I noticed that the Scan of the file works for only the first line.  Trying to get data that are not in the first line results in an error 85.

    Any ideas? Thank you

    It's all in what the scan of the file reads, and what is the next cgaracter in the file.

    Your first analysis of the file reads up to but NOT including the first newline in the file.

    The second read readings where the first reading was arrested and is expected to see 'B' as the next character, but sees the new line instead, and if the analysis fails. You must specify second reading formatted to await the return line.

    You can do this by making the FIRST character of the format string space, that will tell it to expect a number any of charaters 'white space '.

    Yo can indeed put a space at the beginning of the format string in your first analysis of the file and it will match with zero white space characters before you see the AAA. By doing this he also tolerate to see the spaces and tabs before your AAA or BBB identifiers.

    Rod.

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • How to select and default hightlight the first line in a programmatic Table(ADF Table created based on a SortableModel) ADF.

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    We created a table ADF programming related to a SortableModel created programmatically to a bean.


    We need to select and highlight the first row in the table just after making it to retrieve data based on the first line.


    We tried the based on the following thread: How to call the bean support just after JSFF / page fragment loads? and a few other posts online, but it does not work very well.


    W has created a hidden text in the bottom of the JSF model as follows:


    < af:table varStatus = "rowStat" Summary = "table" value = "#{pageFlowScope.crudBean.dynamicTable.collectionModel} '"

    Rows = "#{pageFlowScope.crudBean.dynamicTable.collectionModel.RowCount} '"

    contentDelivery = 'immediate' var = 'row' rendered = 'true '.

    Binding = "#{backingBeanScope.crudBackingBean.tasksTable} '"

    selectionListener = "#{backingBeanScope.crudBackingBean.customListener} '"

    "rowSelection ="single"id ="t1"partialTriggers =": pt_gr2 "columnStretching =" column: clmn0 ">

    < af:forEach items = "#{pageFlowScope.crudBean.dynamicTable.columnNames}" var = 'name' varStatus 'vs' = > "

    < af:column sortable = "true" sortProperty rowHeader = "#{name}" = "no style" headerText = "#{pageFlowScope.crudBean.dynamicTable.columnLabel [name]}" "

    inlineStyle = "width: 100px;"  ID = "clmn$ {vs.index}" >

    < af:activeOutputText value = "#{row [name]}" id = "aot1" / >

    < / af:column >

    < / af:forEach >

    < / af:table >

    ....


    < af:outputText id = "hiddenOutputTextId" visible = "false" value = "#{backingBeanScope.crudBackingBean.afterPageLoad} '"

    Binding="#{backingBeanScope.crudBackingBean.hiddenOutputText}"/ >

    And we have added the code to the bean to support below:

    public String getAfterPageLoad() {}

    If (!.) {AdfFacesContext.getCurrentInstance () .isPostback ()}

    selectFirstRowInTasksTable();

    }

    Return afterPageLoad;

    }

    public void selectFirstRowInTasksTable() {}

    try {}

    RKS RowKeySet = new RowKeySetImpl();

    RowKeySet rksEmpty = new RowKeySetImpl();

    Model CollectionModel = tasksTable.getValue ((CollectionModel));

    ROWCOUNT int = model.getRowCount ();

    If (rowcount > 0) {}

    model.setRowIndex (0);

    Key of the object = model.getRowKey ();

    RKS. Add (Key);

    tasksTable.setSelectedRowKeys (rks);

    SelectionEvent selectEvent =

    new SelectionEvent (tasksTable.getSelectedRowKeys (), rks, tasksTable);

    selectEvent.queue ();

    customListener (selectEvent); / / to retrieve data

    AdfFacesContext.getCurrentInstance () .addPartialTarget (tasksTable);

    }

    } catch (Exception e) {}

    }

    }

    I think that () selectEvent.queue; should work even without calling the customerListener, but it is not working in all cases.

    What is the problem in my code?



    Have you tried to bind property of 'selectedRowKeys' to selection configuration / bean there?

    Something like:

    public RowKeySet getSelectedRKS() {
        if (rks == null) {
            // make first record as selected
            // create RowKeySet and assign it to rks variable(where rks is variable defined in bean with some scope higher than request scope)
        }
        return rks;
    }
    

    Dario

  • Paragraph style, first line "BOLD"

    Hi all

    I try to give a column in a table definition in which the first line is "BOLD" and the rest of the cell is not, like this:

    ---------------------------------------------------------------------------------

    2 3 column cell

    Name of the company
    Address

    Address

    2 4 column cell

    Name of the company
    Address

    Address

    ---------------------------------------------------------------------------------

    I don't know if this is even possible, but it would be a great help.

    I apply the paragraph as follows to the second column:

    ---------------------------------------------------------------------------------

    myTable.columns [1].cells.everyItem () .texts [0] .applyParagraphStyle (contentText);

    ---------------------------------------------------------------------------------

    Here's the paragraph contentText:

    ---------------------------------------------------------------------------------

    contentText var = myDocument.paragraphStyles.item ("contentText");

    Try

    {

    var contentTextName = contentText.name;

    }

    catch (MonErreur)

    {

    contentText = myDocument.paragraphStyles.add({name:"contentText"});)

    }

    contentText.appliedFont = "Arial";

    contentText.fontStyle = "Regular";

    contentText.pointSize = 10;

    contentText.spaceAfter = 10;

    contentText.spaceBefore = 10;

    contentText.fillColor = myDocument.colors.item ("Black");

    ---------------------------------------------------------------------------------

    Is there a way to leave only the first line to be bold?

    Thanks in advance,

    Greetings

    Hello

    You can work with a line for your paragraph style style, if your lines of text are not separated by the sign of paragraph as in a good example shown here:

    If your text is composed as in the example on the left using signs of paragraph, you need a paragraph style distinct for the first paragraph with Arial Bold.

    As already noted Willi Adelberger.

    Example for adding a nested line style:

    var doc = app.documents[0];
    
    // Your paragraph style name that later should contain a line style:
    var paraStyleName = "contentText";
    // For defining a line style we need a character style:
    var charStyleName = "FirstLineBold";
    // All properties for the paragraph style:
    var paraStyleProperties =
    {
        name : paraStyleName ,
        appliedFont : "Arial" ,
        fontStyle : "Regular",
        pointSize : "10 pt",
        spaceAfter : "10 pt",
        spaceBefore : "10 pt",
        fillColor : "Black"
    };
    // All properties for the character style we need for the line style:
    var charStyleProperties =
    {
        name : charStyleName ,
        fontStyle : "Bold"
    }
    
    // Check, if the needed styles are there:
    
    // The paragraph style.
    // using IS NOT VALID is recommended
    if(!doc.paragraphStyles.itemByName(paraStyleName).isValid)
    {
        var paraStyle = doc.paragraphStyles.add(paraStyleProperties);
    }
    else
    {
        var paraStyle = doc.paragraphStyles.itemByName(paraStyleName);
        paraStyle.properties = paraStyleProperties;
    };
    
    // The character style.
    // using IS NOT VALID is recommended
    if(!doc.characterStyles.itemByName(charStyleName).isValid)
    {
        var charStyle = doc.characterStyles.add(charStyleProperties);
    }
    else
    {
        var charStyle = doc.characterStyles.itemByName(charStyleName);
        charStyle.properties = charStyleProperties;
    }
    
    // At this point we have a valid paragraph style and a valid character style.
    // Now let's add a line style.
    
    /*
        Note and warning:
        In case the paragraph style already has one or several line styles we
        have to either remove them to get our new line style at "pole position",
        because there is no move() method to bring a new line style up in the stack of line styles.
    
        Or we have to redefine the first line style. Which is done below.
    
        About removing line styles:
        Tested and is not working with CS6. Could be a bug.
        paraStyle.nestedLineStyles.everyItem().remove()
        So I think it is best to loop through and remove them one by one.
    
    */
    
    // Redefining the first line style if there is already one.
    // Else add a new one.
    
    // Note: Using the properties-property is not working here:
    
    if(paraStyle.nestedLineStyles.count()>0)
    {
        paraStyle.nestedLineStyles[0].appliedCharacterStyle = charStyle;
        paraStyle.nestedLineStyles[0].lineCount = 1;
    }
    else
    {
        paraStyle.nestedLineStyles.add({appliedCharacterStyle : charStyle , lineCount : 1});
    }
    

    For DOM documentation, see the following sources:

    Jongware:

    InDesign JavaScript help

    Gregor Fellenz:

    InDesign ExtendScript API (8.0)

    InDesign ExtendScript API (10.0)

    InDesign ExtendScript API (11.0)

    Kind regards
    Uwe

  • Discover with function as datasource returns only the first line.

    Hello

    I created the following function to get the status of all the rules for the instances of SQL Server.

    The data type of the function output has been configured as 'List of SQLInstanceRuleStatuss', where SQLInstanceRuleStatuss is the custom type, I created in the same module.

    When I tested the function, it returns all instances of SQL Server with two other columns.

    But when I try to create a view with the Rows property that is configured to use the feature, it returns only the first line:

    sqlRules = new ArrayList();

    queryStatement = server. QueryService.createStatement ("(DBSS_Instance)");

    queryResult = server. QueryService.executeStatement (queryStatement);

    for (it in queryResult.topologyObjects)

    {

    sqlRule is functionHelper.createDataObject ("westjet_mark_dev:SQLInstanceRuleStatus", "none", "test");.

    sqlRule.instance = it;

    sqlRule.ruleName = 'test rule name';

    sqlRule.status = false;

    sqlRules.add (sqlRule);

    }

    Return sqlRules;

    Did I miss something?

    Thank you

    Mark

    Mark,

    I think I forgot something

    sqlRule=functionHelper.createDataObject("westjet_mark_dev:SQLInstanceRuleStatus","none","test");

    you create the test id

    change your line of

    sqlRule=functionHelper.createDataObject("westjet_mark_dev:SQLInstanceRuleStatus","none",null);

    This should allow the creation of a single object in your loop for

  • Using of "get the N first lines only" does / * + FIRST_ROWS ([N]) * / redundant index?

    I know FIRST_ROWS indicator shows the optimizer to minimize the time of the first row.  I know that the new feature of 12 c for "fetch [FIRST |]» [NEXT] [N] LINES [ONLY |] WITH LINKS] "get first/next N lines only / with ties" will implement the query using ROW_NUMBER().  Should I leave hint in case it improves performance, or the clause FETCH FIRST made this redundant suspicion?

    Hi Wes and Hoek,

    Oracle said on the indicators in the 12 c setting guide. Each version of this statement becomes stronger.

    The disadvantage of the advice is additional code that you must manage, audit and control. Tips have been introduced in Oracle7, when users have little recourse if the optimizer generated suboptimal plans. Because changes in the database and host environment can make obsolete tips or negative consequences, it is a good practice to test the use of indicators, but use other techniques to manage the execution plans.

    Oracle provides several tools, including how to set up SQL, SQL plan management and SQL Performance Analyzer to solve performance problems unresolved by the optimizer. Oracle strongly recommends that you use these tools instead of advice because they provide new solutions like the change of environment data and database.

    Oracle presents advice in V7, basically as an admission that its optimizer based on CSSTidy based cost did not get things right all the time and tried to get rid of them since. In addition, the preferred method of setting when you are browsing the major updates was to review advice to remove them. It will be interesting to what extent can it be pushed in V12.

    In what concerns the first lines index and ROWNUM limiting, unless you just try to get the garbage data, it's meaningless without the presence of an ORDER BY. Once you have an ORDER BY, the query must retrieve all the data before it can return anything. The exception to this rule is if there is an index that the database can use to retrieve already ordered data, that is to say on the order of columns. Therefore, the essence of the indication of FIRST LINES. It will be aggressive looking in the index in favor if the index is in line with the order of. (Try the setting of a SIEBEL instance if you need proof)

    I don't have a 12 c to test at the moment, but looking at the examples of Martin, it appears the optimizer is aware of the new windowing function in the new FETCH FIRST/NEXT structure and selects a plan that gives the best answer. If you go through the effort to review suggested rownum limited requests to remove the tips if possible, maybe you should just rewrite with new windowing function.

    Concerning

    André

  • Foreach returns only the first line of a dataset object

    Hello, guys.

    I am having trouble with a procedure in Oracle 9.2.0.1.0.

    I have a query that returns the number of lines, but whenever I try to browse by using a foreach loop, I only get the first line and then the loop is completed.

    For example, here's the query:

    select 
          (
            CASE
              WHEN
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') < DATE '2009-01-01'
              THEN DATE '2009-01-01'
              ELSE
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) startdate,
    
    
          (
            CASE
              WHEN
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') > DATE '2009-06-08'
              THEN DATE '2009-06-08'
              ELSE 
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) enddate
         
        FROM dual
        CONNECT by trunc(DATE '2009-06-08','dd') >= add_months(trunc(DATE '2009-01-01','dd'),level - 1)
    

    Who shows me this output:

    STARTDATEENDDATE
    01/01/20092009-01-31
    02/01/200928/02/2009
    03/01/200931/03/2009
    04/01/200930/04/2009
    05/01/200931/05/2009
    06/01/200906/08/2009

    But whenever I run this code:

      for rec in
      (
        select 
          (
            CASE
              WHEN
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') < DATE '2009-01-01'
              THEN DATE '2009-01-01'
              ELSE
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) startdate,
          (
            CASE
              WHEN
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') > DATE '2009-06-08'
              THEN DATE '2009-06-08'
              ELSE 
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) enddate
         
        FROM dual
        CONNECT by trunc(DATE '2009-06-08','dd') >= add_months(trunc(DATE '2009-01-01','dd'),level - 1)    
      )
      loop
        DBMS_OUTPUT.put_line(TO_CHAR(rec.startdate, 'YYYYMMDD') || '-' || TO_CHAR(rec.enddate, 'YYYYMMDD'));
      end loop;
    

    I get this result:

    20090131 20090101

    I tried debugging and I checked that the loop runs that once, and then passes the end of loop. I'm doing something wrong?

    Thank you!

    Best regards

    Vinicius

    Try:

    for rec in

    (

    Select * from (select

    (

    CASE

    WHEN

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "jj"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), "DD/MM/YYYY")< date="">

    THEN DAY ' 2009-01-01'

    ON THE OTHER

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "jj"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), "DD/MM/YYYY")

    END

    ) startdate.

    (

    CASE

    WHEN

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm') and level)-1, "dd"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), ' DD/MM/YYYY') > DATE '' 2009-06-08

    THEN DAY '' 2009-06-08

    ON THE OTHER

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm') and level)-1, "dd"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), "DD/MM/YYYY")

    END

    ) enddate

    OF the double

    CONNECT by trunc (DATE 2009-06 - 08 ',' dd') > = add_months (trunc (DATE 2009-01 - 01 ',' dd'), level - 1)

    )   )

    loop

    Dbms_output.put_line (TO_CHAR (rec.startdate, 'YYYYMMDD') |) '-' || To_char (rec.enddate, 'YYYYMMDD'));

    end loop;

    SY.

  • How can I change the first line of the table to a header row if it contains PGF with tblHead tags

    So far, I have the following text in a JavaScript:

    If (tbl. FirstRowInTbl.FirstCellInRow.FirstPgf.PgfFmt.Name = "tblHead")

    {

    If (tbl. FirstRowInTbl.RowType = 1).

    1 is Constants.FV_ROW_BODY

    tbl. FirstRowInTbl.RowType = 0;

    0 is Constants.FV_ROW_HEADING

    on the other

    continue;

    }

    on the other

    continue;

    It does not work. I'm not comfortable with tbl. FirstRowInTbl.FirstCellInRow.FirstPgf.PgfFmt.Name.

    It is clearly wrong. How I would I want to determine the tag of the first paragraph of the first line?

    Any help is very appreciated!

    Thank you

    Ruth

    Ruth, here is a function that converts the body lines to the header of a table lines. Please let me know if you have any questions or comments. -Rick

    #target framemaker
    
    var doc = app.ActiveDoc;
    
    // Set a variable for the selected table.
    var tbl = doc.SelectedTbl;
    
    // Convert the first body row to a heading row.
    bodyToHeadingRow (tbl, 1, doc);
    
    function bodyToHeadingRow (tbl, num, doc) {
    
        var row = 0;
    
        // Select the top "num" rows in the table.
        tbl.MakeTblSelection (0, num - 1, 0, tbl.TblNumCols - 1);
        // Push the current clipboard contents and cut the selected rows.
        PushClipboard ();
        doc.Cut (Constants.FF_CUT_TBL_CELLS);
        // Add "num" number of heading rows to the table.
        row = tbl.FirstRowInTbl;
        row.AddRows (Constants.FV_Heading, num);
        // Select the new heading rows.
        tbl.MakeTblSelection (0, num - 1, 0, tbl.TblNumCols - 1);
        // Paste the rows from the clipboard into the new heading rows.
        doc.Paste (Constants.FF_REPLACE_CELLS);
        // Restore the clipboard contents.
        PopClipboard();
    
    }
    
  • Text box formatting withdrawal negative first: first line begins on the left, the rest is on the right.

    InDesign CS6 finally arrived less than two weeks before I need the preliminary version of a major publication. I used last InDesign version 3 or 4. I used Publisher lately. I'm half way through the manual ID so direct me to a page number if this is the answer in there.

    I want the first line of a paragraph in my text box to start on the left, then jump to a tab where more text begins. Until then, the text would wrap tab if it is long enough. Then the process begins again with the following paragraph in the same text box. I would like this formatting be automatic, with not much fuss on my part to do at work - and run around (not on top of) pictures on the right.

    It should look like this:

    -----

    Funding: Funding goes here. It is long.
    It wraps to the point the tab to the 'a '.

    Description: A description goes here. It is long.
    It wraps to the point the tab to the 'a '.

    -----

    In Word, do you it by pulling the back 'home' to the right, where it aligns with the tab, and it is called a "hanging indent."

    Is it possible (easily) in InDesign? Or do I have two areas of text with the vertices lined up, to get two different margins 'left'?

    I tried to do it with a table but sometimes the table gets too long and the bottom line or two disappears, even if the blue lines are way big... and the text is not flowing around the photos to the right, so I have to keep narrow if the type is not on the top of the photo. This is not the effect I want! My last page model has seven two columns, a table of line that is not an ideal solution either because I have to manually set the gaps between paragraphs and tables - and the text isn't always in circulation around the photos.

    Help!

    Peter's suggestion works if you prefer justified left, titles that show you in your example. Indent to here works when you want to right justified titles that I show in my example.

  • make the first line of each paragraph "BOLD"

    Hi all

    I read this forum, but I can't really find the answer, I need.

    Here's my problem, we intend to automate the flow of text in our Organization, that's what I have to do

    -read the input from the story of a database

    -flow text into a text box in particular for example 4.5 cm wide

    -each paragraph will be had 2 new lines

    -Select the first line of each paragraph then putting in bold.

    in the above list, I can do everything except the first paragraph selection and putting in bold. I am looking for the selection of text I see there is a function called textframe.select?

    Can someone help me with this please?

    This severely reduced your options. (Which reminds me, you can specify a detail important like that from the beginning the next time.)

    The simple solution would be to apply your "BOLD" font (or better: a character style) in the first line of each paragraph by using the property of a paragraph .lines. UH customary ‑‑ link to the HTML version of the omitted OMV, it seems I'm not coming back as much as CS2... (Is there a CHM for it to http://www.jongware.com/idjshelp.html).

    This should work:

    App.Selection [0] .paragraphs [0]. Lines [0] .appliedCharacterStyle = "YourBoldCharStyle";

    ... With your cursor in the paragraph you want to change. Will adjust to meet your specific needs.

    There is a drawback of the simple method. Unless you use a special police who makes bold with the same width as her (quite rare) usually, the text will be redistributed after he applied. So there are one or more words in bold on the next line, so you must remove the tank style "BOLD" of those. But! At that time InDesign may determine that these non-bold words may go back on the first line!

    Well written code does not help, because it could be possible the same word oscillates backwards with each change between the first and the second line, each time to cheat... At * some * point you'll have to help the poor ID a bit; perhaps to fix this first line with No Break applied.

  • Pulling on the first line with a value of repetition

    Hello
    We use the Oracle 11.1.

    We have a table of postal codes.

    We have several lines for each zip code because we have different areas that use the same zip code.

    We want to reduce the lines of a line by zip code. But they said use they want to keep the fields that differ (neighborhood of the exodus).

    Then they said "Just take the first value of each."

    This code reduces the postcodes of a line by postal code, but as you can see I replaced the field with the name of the field values.
    SELECT distinct  ZIPCODE, CITY, STATE, COUNTY, AREACODE, 'CITYTYPE', CITYALIASABBREVIATION, 'CITYALIASNAME', LATITUDE, LONGITUDE, TIMEZONE, ELEVATION, COUNTYFIPS, DAYLIGHTSAVING, PREFERREDLASTLINEKEY, CLASSIFICATIONCODE,
               MULTICOUNTY, STATEFIPS, 'CITYSTATEKEY', 'CITYALIASCODE', 'PRIMARYRECORD', CITYMIXEDCASE, 'CITYALIASMIXEDCASE', STATEANSI, COUNTYANSI
        FROM   zip_code
    GROUP BY   ZIPCODE, CITY, STATE, COUNTY, AREACODE, CITYTYPE, CITYALIASABBREVIATION, LATITUDE, LONGITUDE, TIMEZONE, ELEVATION, COUNTYFIPS, DAYLIGHTSAVING, PREFERREDLASTLINEKEY, CLASSIFICATIONCODE, MULTICOUNTY, STATEFIPS,
               CITYALIASCODE, PRIMARYRECORD, CITYMIXEDCASE, STATEANSI, COUNTYANSI
    order by zipcode; 
    How should I take either one record per postal code with the first value in these fields or

    How should I take the first record for each zip code?

    either way works for me.

    Thank you

    Hello

    This is called a Query Top - N , and this is a way to do it:

    WITH     got_r_num     AS
    (
         SELECT     z.*
         ,     ROW_NUMBER () OVER ( PARTITION BY  zipcode
                                   ORDER BY          city
                             ,                ...   -- add tie-breakers here
                           )      AS r_num
         FROM    zip_code
    )
    SELECT     *     -- or list all columns except r_num
    FROM     got_r_num
    WHERE     r_num     = 1
    ;
    

    You can simply use MIN or MAX on the columns, as the line with the name of the minimum city do not lowest have area code or the longitude. The above method preserves the first line of each zip code intact, where the 'first': the first in order of aphabetic by the name of the city. If it is not unique, then you may want breakage to the analytical ORDER BY clause.

    If you are deleting rows, you can use this in a NOT IN subquery. If you copy lines to a new table, you can use the query above in an INSERT statement.

    Published by: Frank Kulash, March 18, 2011 12:40

    I just see Polywog response:

    Pollywog wrote:
    You can use the rank or rownumber function...

    If I understand the problem, you don't want to use RANK in this particular case. When there is equality, GRADE will assign 1 to all the contenders. I think the whole point of this thread is that you exactly want a #1 in each zip code, which is what ROW_NUMBER, but not RANK, guarantees.

Maybe you are looking for

  • updated iPod touch 5 iOS 9.3

    I feel stupid for asking this question, but I can't seem to find the answer anywhere Ios 9.3 is available for iPod 5th generation again? I have the original download, but he was shot until I updated, so now I just get an error saying no internet conn

  • Without titles, generators or themes since the restoration of Time Machine

    Mac froze on startup.  Had to full restore from Time Machine.  Since then in FCPX 10.2/3 has experienced frequent crashes while trying to open some events. Now, I also know that there are no titles, generators or themes more.  Help recover. What shou

  • How can I restore my time capsule documents folder?

    I use an iMac OS X El Capitan and support up to a Time Capsule airport running. One of our user accounts on the iMac ran into problems w access to the apple of the user ID (could not access iCloud preferences, etc.) before doing a clean reinstall of

  • Pavilion dv6: upgrading RAM for HP Pavilion dv6

    Hello I want to upgrade the memory of my laptop. It has 4 GB (2x2gb). I want to move to 8 GB or 16 GB, if possible. I found some RAM modules on newegg.com such as this one - http://www.newegg.com/Product/Product.aspx?Item=N82E16820139976 - I wonder i

  • A2107A-F Bloatware Android uninstall help

    I have a new model of A2107A-F 2298. He has a lot of apps that I don't need. Application management screen offers only an off button. How to uninstall unwanted applications?