Table cells - Problem with merged cells

Hi
I was experiencing very weird behavior with my tables until I realized that it was caused by merged cells
My script gives a dialog which allows the user to choose from which column to start and from which row.
As the script iterates through the cells in the selection I was getting weird results
Through using .select() function I was able to see that depending on the column, some times row 5 could be which seems to be row 3!
The reason was because of merged cells in that row
I.e., when some cells are merged together, only the first column of those merged cells is recognized - the others are not
so it comes out that when merging cells from column 3 to 5, column 3 has a cell in that row, columns 4 and 5 do not, and column 6 does!
Is there a way to get around this behavior?
Thanks
Davey

I don't understand the point of your post.
If you're trying to report a problem or "bug" with Pages, that is not the purpose of this user-to-user forum. You should leave feedback for the Pages team on this page.
I've not had a problem opening Word files with tables in Pages. If you're saying Word can't handle tables with merged cells, then don't use merged cells in files you are going to export as Word. Word & Pages must handle merged table cells differently, as I know both can do that. As far as RTF, Pages can open & export as RTF. Again, if you are going to export as RTF, don't use tables. Neither of these is a fault of Pages, just limitations of the formats/programs.

Similar Messages

  • Help with merged cells in table

    I'm just learning how to use Dreamweaver 8 and tables. I am
    trying to use a table with merged cells filled with graphics --
    only one graphic per cell. I make my jpg the size of my cell, which
    it seems to fill. Then, when I upload it to view in browser, it
    looks as though the graphic doesn't take up the entire cell. At one
    point, it was working both in Dreamweaver and the browser. Now, in
    the browser view, it looks as though there is extra space above the
    graphic and below it. Any suggestions on what is going on???

    It's not the use of tables with your graphics that is
    necessarily the
    problem, it's HOW you are using the tables with your
    graphics. Can we see
    the page you have built so we can examine the code?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "degazon" <[email protected]> wrote in
    message
    news:gasr2p$10m$[email protected]..
    > Thanks! It's now evident that I shouldn't use tables
    with the graphics.

  • How to hide rows with merged cells?

    I would like to know how to hide rows on numbers with merged cells, could do it normally at excel but I am not being able to do it at Numbers.
    thanks!

    Felipe,
    To hide a row with Merged Cells, Un-Merge first, then Hide. Select the Merged Cells and Table > Unmerge.
    Note that this is only a problem with vertically merged cells when you want to Hide a Row.
    If you want to Hide a Column, you can't have a Horizontal Merge that involves that Column.
    Jerry

  • Performance problem with MERGE statement

    Version : 11.1.0.7.0
    I have an insert statement like following which is taking less than 2 secs to complete and inserts around 4000 rows:
    INSERT INTO sch.tab1
              (c1,c2,c3)
    SELECT c1,c2,c3
       FROM sch1.tab1@dblink
      WHERE c1 IN (SELECT c1 FROM sch1.tab2@dblink);I wanted to change it to a MERGE statement just to avoid duplicate data. I changed it to following :
    MERGE INTO sch.tab1 t1
    USING (SELECT c1,c2,c3
       FROM sch1.tab1@dblink
      WHERE c1 IN (SELECT c1 FROM sch1.tab2@dblink) t2
    ON (t1.c1 = t2.c1)
    WHEN NOT MATCHED THEN
    INSERT (t1.c1,t1.c2,t1.c3)
    VALUES (t2.c1,t2.c2,t2.c3);The MERGE statement is taking more than 2 mins (and I stopped the execution after that). I removed the WHERE clause subquery inside the subquery of the USING section and it executed in 1 sec.
    If I execute the same select statement with the WHERE clause outside the MERGE statement, it takes just 1 sec to return the data.
    Is there any known issue with MERGE statement while implementing using above scenario?

    riedelme wrote:
    Are your join columns indexed?
    Yes, the join columns are indexed.
    You are doing a remote query inside the merge; remote queries can slow things down. Do you have to select all thr rows from the remote table? What if you copied them locally using a materialized view?Yes, I agree that remote queries will slow things down. But the same is not happening while select, insert and pl/sql. It happens only when we are using MERGE. I have to test what happens if we use a subquery refering to a local table or materialized view. Even if it works, I think there is still a problem with MERGE in case of remote subqueries (atleast till I test local queries). I wish some one can test similar scenarios so that we can know whether it is a genuine problem or some specific problem from my side.
    >
    BTW, I haven't had great luck with MERGE either :(. Last time I tried to use it I found it faster to use a loop with insert/update logic.
    Edited by: riedelme on Jul 28, 2009 12:12 PM:) I used the same to overcome this situation. I think MERGE needs to be still improved functionally from Oracle side. I personally feel that it is one of the robust features to grace SQL or PL/SQL.

  • Problems with Merging Account

    Hi Experts,
    I have 2 problems with merging accounts:
    1) Opportunity is not moved from source data to master data. I do not know why. Central BP is changable.
    2) Contact Person is only copied, not moved. This causes problems later on when we want to delete the source data.
    Any idea how to solve this?
    Best regards,
    Cristina

    Hi Arno:
    First of all: Thanks for answering my thread!
    The problem with opportunities in my system is, that they are not merged at all, not even with the batch job. I checked trx. BUSWU02. Node CRM370 is assigned to variant CLEAR_REP.
    Also the central Business Partner in opportunity remains changable, once the opportunity was saved.
    Anything else I have to check??
    Best regards,
    Cristina

  • [CS4/JS] Import CALS-Tables with merged cells

    Hello scripters.
    I am actually trying to import CALS-tables (which is in my imported XML) into InDesign.
    I used the convertElementToTable for this.
    That worked, except for the merged cells (only cells which are merged to two or three columns).
    How could I script the automatic generation for merged cells?
    My xml-cals-table looks the following:
    <example>
        <table class="n" width="600" border="0">
            <colgroup>
                <col width="35%"/>
                <col width="30%"/>
                <col width="35%"/>
            </colgroup>
            <tr>
                <td colspan="3">
                    <ta>content content content content content content content content</ta>
                </td>
            </tr>
            <tr>
                <td align="left" valign="top">
                    <ta>content content content content </ta>
                </td>
                <td align="left" valign="top">
                    <ta>content content </ta>
                </td>
                <td align="right" valign="top">
                    <ta>content content </ta>
                </td>
            </tr>
            <tr>
                <td align="left" valign="top">
                    <ta>content content </ta>
                </td>
                <td align="left" valign="bottom">
                    <ta>content content </ta>
                </td>
                <td align="right" valign="bottom">
                    <ta>content content </ta>
                </td>
            </tr>
        </table>
    </example>
    Thanks in advance for any help!
    Franziska

    Hello scripters.
    I am actually trying to import CALS-tables (which is in my imported XML) into InDesign.
    I used the convertElementToTable for this.
    That worked, except for the merged cells (only cells which are merged to two or three columns).
    How could I script the automatic generation for merged cells?
    My xml-cals-table looks the following:
    <example>
        <table class="n" width="600" border="0">
            <colgroup>
                <col width="35%"/>
                <col width="30%"/>
                <col width="35%"/>
            </colgroup>
            <tr>
                <td colspan="3">
                    <ta>content content content content content content content content</ta>
                </td>
            </tr>
            <tr>
                <td align="left" valign="top">
                    <ta>content content content content </ta>
                </td>
                <td align="left" valign="top">
                    <ta>content content </ta>
                </td>
                <td align="right" valign="top">
                    <ta>content content </ta>
                </td>
            </tr>
            <tr>
                <td align="left" valign="top">
                    <ta>content content </ta>
                </td>
                <td align="left" valign="bottom">
                    <ta>content content </ta>
                </td>
                <td align="right" valign="bottom">
                    <ta>content content </ta>
                </td>
            </tr>
        </table>
    </example>
    Thanks in advance for any help!
    Franziska

  • Problem with coloring cells in dynamic fieldcatalog

    Hi All,
    I am trying to color cells based on the values in the cells. Here we are using dynamic fieldcatalog and internal table to build the ALV grid.I am getting problem in adding a field to the fieldcatlog which is of type lvc_t_scol. This Part of the code is used to build fieldcatlog dynamically.
    DEFINE add_cat.
        add 1 to lv_count1.
        lwa_fldcat-col_pos     = lv_count1.
        lwa_fldcat-fieldname = &1 .
        lwa_fldcat-reptext   = &2.
        lwa_fldcat-inttype   =  &3.
        lwa_fldcat-intlen    = &4.
        append lwa_fldcat to lt_fldcat .
      END-OF-DEFINITION.
    *Add Columns to the fieldcatalog
      add_cat c_proj 'Project' 'C' '30'.
      add_cat c_cust 'Customer' 'C' '30'.
      lwa_fldcat-col_pos     = 12.
        lwa_fldcat-fieldname = 'cellcolor' .
        lwa_fldcat-reptext   = 'cell color'.
    <b>    lwa_fldcat-inttype   =  'lvc_t_scol'.</b>
        append lwa_fldcat to lt_fldcat .
    Here i want to assign internal table(lvc_t_scol) to the fieldcatalog as a field.But  lwa_fldcat-inttype is of size 1 which will take one char. Is there any way that we can assign field of type internal table to the field catalog. Becoz of this i am unable to color cells in my ALV grid.
    Thanks

    It is not possible with the METHOD cl_alv_table_create=>create_dynamic_table to include another table inside that newly generated table.
    I have tried to do it with the code and I got the dynamic table created after at the end of the program.
    In the code,
    <DYN_TABLE> has same effect as your <table> variable
    <DYN_WA> has same effect as your <HEADER>
    REPORT  ZTEST_NP_DYNAMIC.
    DATA: DY_TABLE TYPE REF TO DATA,
          DY_LINE  TYPE REF TO DATA.
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>,
                   <DYN_FIELD>.
    FIELD-SYMBOLS: <FS> TYPE ANY.
    * To generate the Dyanmic table with the COLOR
    DATA: LS_SOURCE TYPE STRING.
    DATA: LT_SOURCE LIKE STANDARD TABLE OF LS_SOURCE WITH HEADER LINE.
    DATA: L_NAME LIKE SY-REPID.
    DATA: L_MESSAGE(240) TYPE C,
          L_LINE TYPE I,
          L_WORD(72) TYPE C.
    DATA: L_FORM(30) TYPE C VALUE 'TABLE_CREATE'.
    LT_SOURCE = 'REPORT ZTEST_SUBROUTINE_POOL.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'FORM  TABLE_CREATE USING I_FS TYPE ANY.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BEGIN OF LT_GENTAB OCCURS 0.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BUKRS TYPE BUKRS. '.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BKTXT TYPE BKTXT. '.
    APPEND LT_SOURCE.
    * you can add your fields here.....
    LT_SOURCE = 'DATA: COLOR TYPE lvc_t_scol. '.  " <<
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: END OF LT_GENTAB.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: POINTER TYPE REF TO DATA.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'CREATE DATA POINTER LIKE STANDARD TABLE OF LT_GENTAB.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'I_FS = POINTER.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'ENDFORM. '.
    APPEND LT_SOURCE.
    L_NAME = 'ZTEST_SUBROUTINE_POOL'.
    CATCH SYSTEM-EXCEPTIONS GENERATE_SUBPOOL_DIR_FULL = 9.
      GENERATE SUBROUTINE POOL LT_SOURCE NAME L_NAME
               MESSAGE L_MESSAGE LINE L_LINE WORD L_WORD.  "#EC CI_GENERATE
    ENDCATCH.
    IF NOT L_MESSAGE IS INITIAL.
      MESSAGE E000(0K) WITH L_MESSAGE L_LINE L_WORD.
    ENDIF.
    ASSIGN DY_TABLE TO <FS>.
    PERFORM (L_FORM) IN PROGRAM (L_NAME) USING <FS>.
    ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    * Create dynamic work area and assign to FS
    CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
    ASSIGN DY_LINE->* TO <DYN_WA>.
    Write: 'bye'.
    Regards,
    Naimesh Patel

  • Refresh Webi report with merged cells in crosstab in PowerPoint

    Hello,
    I have created a Webi report with a crosstab. In this crosstab I have merged some cells in the top left corner and inserted a title for the crosstab. Now I want to import the crosstab in PowerPoint with Live Office. The problem is, that after the import in PowerPoint the cells are not merged anymore. So I merged them manually. When I refresh the crosstab, the cells are still merged in PowerPoint, but they are empty.
    Any ideas how to solve this issue?
    Uwe

    Hello,
    I have created a Webi report with a crosstab. In this crosstab I have merged some cells in the top left corner and inserted a title for the crosstab. Now I want to import the crosstab in PowerPoint with Live Office. The problem is, that after the import in PowerPoint the cells are not merged anymore. So I merged them manually. When I refresh the crosstab, the cells are still merged in PowerPoint, but they are empty.
    Any ideas how to solve this issue?
    Uwe

  • Printing problem with gray cells in smartforms

    Hi there,
    i have developed a smart form with some color logo and some gray shaded cells. If i print it by SAPLPD it comes out fine but when i print it on a printer configured in SAP it doesn’t come out properly. All the gray cells print as black cells. Any advice?
    Regards.

    Asif,
    it some times depends upon the printer drivers also
    i faced the same problem with one printer then i tried with the other hpcolor printer then i got the printout perfectly that means sometimes the drivers of the printer will crash with the program
    so its better u try this one in the another printer
    if u have this problem futher let me know
    Regards
    naveen

  • How can I hide columns that has rows with merged cells?

    I'm making a schedule on Numbers and there are couple of rows that are one cell (merged).
    Because of this reason when I select a column to hide, it's not just the column that is being selected but the column and the all the merged cells that goes across the row. I would like to hide selected column to print different columns. Please help me! thank you!

    There is even more powerful tip.
    Double click in a cell
    Show Rulers
    Insert a "center tab"
    move it to the right edge of the cell
    type option + tab then your wanted string.
    You will get that :
    Add this tip to the drawbacks of merged cells and you will understand why I never used them.
    Yes, it may be surprising but the right tab belongs to the cell D2 !
    Yvan KOENIG (VALLAURIS, France) mercredi 8 juin 2011 16:25:25
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Print ALV with merged cells

    Hi all,
    I have a requirement to print an ALV grid display exactly in the same format as we see in output. That is, if the cells are merged in ALV then in Print also they should come as merged.
    But when I am printing the ALV output it does not give merged cells. I am using OO ALV.
    Is my requirement feasible. If yes, Please help me to proceed?
    Thanks,
    Daya

    Hi Daya,
    In the ALV grid control print or print preview, cells that have identical content are not merged.  This is necessary in order to be able to distinguish between blank cells and cells that only become blank after merging.  The standard behaviour for the different ALV lists is described in Note 447055.
    Regards,
    Md Ziauddin

  • Problem with MERGE statement

    Hi All,
    We are encountering a strange problem with the merge command.
    The following statement works :-
    merge into ATTRIBUTE_GROUP@US_PRODUCT_UAT a
    using
         select
              a1.group_id,
              a1.NAME,
              a1.CREATE_DATE,
              a1.MODIFY_DATE
         from
              ATTRIBUTE_GROUP_LOG a1,
              product_push_wrk a2
         where
              a2.column_id = a1.group_id and
              a2.modify_date = a1.modify_date ) b
    on ( a.group_id = b.group_id)
    when matched then
         update set
              a.NAME = b.NAME,
              a.CREATE_DATE = b.CREATE_DATE,
              a.MODIFY_DATE = b.MODIFY_DATE
    when not matched then
         insert
              a.group_id,
              a.NAME,
              a.CREATE_DATE,
              a.MODIFY_DATE
         values
              b.group_id,
              b.NAME,
              b.CREATE_DATE,
              b.MODIFY_DATE
    However when we change the order of the columns in the select query as follows the an error occurs : -
    merge into ATTRIBUTE_GROUP@US_PRODUCT_UAT a
    using
         select
              a1.NAME,
              a1.group_id,
              a1.CREATE_DATE,
              a1.MODIFY_DATE
         from
              ATTRIBUTE_GROUP_LOG a1,
              product_push_wrk a2
         where
              a2.column_id = a1.group_id and
              a2.modify_date = a1.modify_date ) b
    on ( a.group_id = b.group_id)
    when matched then
         update set
              a.NAME = b.NAME,
              a.CREATE_DATE = b.CREATE_DATE,
              a.MODIFY_DATE = b.MODIFY_DATE
    when not matched then
         insert
              a.group_id,
              a.NAME,
              a.CREATE_DATE,
              a.MODIFY_DATE
         values
              b.group_id,
              b.NAME,
              b.CREATE_DATE,
              b.MODIFY_DATE
    ERROR at line 15:
    ORA-00904: "B"."GROUP_ID": invalid identifier
    SQL> l 15
    15* on ( a.group_id = b.group_id)
    The structure of the attribute_log table is as follows :-
    SQL> desc ATTRIBUTE_GROUP
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE NOT NULL DATE
    MODIFY_DATE NOT NULL DATE
    Any pointers to the cause of this error will be highly appreciated.
    Thanks and Regards,
    Suman

    The table structures are as follows :-
    04:17:17 SQL> desc product_push_wrk
    Name Null? Type
    COLUMN_ID NOT NULL NUMBER
    TYPE NOT NULL VARCHAR2(10)
    PARENT_COLUMN_ID NUMBER
    LEVEL_NO NUMBER
    MODIFY_DATE NOT NULL DATE
    04:17:25 SQL> desc ATTRIBUTE_GROUP_LOG
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE DATE
    MODIFY_DATE DATE
    04:18:02 SQL> desc ATTRIBUTE_GROUP
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE DATE
    MODIFY_DATE DATE

  • Absolute cell references with named cells?

    I know how to make a cell reference absolute with numbered cells, as in $A12.
    But what if the formula includes named cells, as in:
    =Table 1 :: 'Electric - Tank' Annual Fuel Cost+Table 1 :: 'Electric - Tank' annual maintenance
    I have tried the $ in various places, no luck so far. Please help...

    I found another similar thread, and the folks there helped me figured out what I was doing wrong.
    You need $ before EACH reference, both the cell's Row header AND column header. This made sense for the "old" cell label way, but the header names confused me at first. So:
    =Table 1 :: $Electric Tank $Annual Fuel Cost+Table 1 :: $Electric Tank $annual maintenance

  • ICloud not syncing and Contact problems with merging duplicates

    I was having problems with the syncing of my notes app. When I got the iphone 5 I had since using Mountain Lion I had started to make use of the fact that the notes sync across iCloud. Great. Although not for long. Everything was going fine notes were syncing across devices but then spontaneously they stopped syncing for no apparent reason. I then went to look in settings, looked online and all through discussion forums. Switching notes on and off on icloud both on the macbook and on my iphone. Restarting devices etc etc. iCloud itself online was not able to access the notes app. I kept getting error messages that I would submit to apple. Then I finally relqinquished and unhooked the iCloud accounts from the computer and phone. And at the sacrifice of losing albums in my photostream they sprung back to syncing.
    Then the real problem happened. I had selected to keep a copy of my address book in contacts when I unhooked my computer just in case. When everything linked back up again, I then had duplicates in my address book. Not 1 (this can happen just having icloud active) but 5 sets of duplicates, granted I had kept a version from when I unhooked. So I looked around again for how I could quickly and easily get rid of duplicates. Following suggestions online I go into contacts>cards>look for duplicates. I had 1200 or somthing duplicates, so naturally when given the option "would you like to merge the info in these duplicates I click yes. The MacBook starts to chugg away. Its gonna take a while. So I come back later. And before returning to CONTACTS, go to send a message from MESSAGES and I notice that 80% of the threads have no name. I go back to CONTACTS and WHAM 100s of contacts disappeared in the merge never to be retrieived again. You cant restore CONTACTS from Time Machine as it is just mirrors the contacts that you have in present time. Restoring phone doesn't work becasue it just downloads from iCloud after it has restored. TOTALLY RIDICULOUS. I am livid.

    what I mean is - create a complete new contact on your contacts and select a picture for it from your Mac. Then set it as "make this my card"
    Once you have done that - presumably it will sync with iCloud - have a look and the contact should appear on your iPhone too.
    On your iPhone go on Settings>Mail,Contacts,Calendar> Under "Contacts: in "My Info" select That new contact you created on your Mac.
    Let me know if that works.
    -On another note, so what you are saying is, if I take my 15' Macbook Pro in and they have none of the old ones in stock, they just give you a Retina display one! Did you take it to them for the contact issue you were having or something else?

  • Problem with Merge into stmt

    Dears,
    I m using 10g XE.
    I am using merge into stmt, to inesrt non matched records and to update matched records with respect to primary key.
    I have two uers in oracle. (TMP and REAL)
    I have n number of tables with same definition in both users.
    I will always merge all the tables into "REAL" from TMP uesr
    Each and very table may contain more than 200000 records.
    while merging some of the records got deleted from the REAL user which already available in REAL user.
    i.e records available in TEMP.A is not available in REAL.A
    if i re rerun the merge qry once again, the missing records inserted into REAL.A
    how it happens? is ther is any bug with merge into stmt while processing huge amount of rows.
    Sample Qry:
    MERGE INTO REAL.med_stock_sales B
    USING (
    SELECT 1 AS RETAIL_OUTLET_ID,mss_id,MSS_ITEMCODE,MSS_TRAN_DATE,MSS_TRAN_TYPE,MSS_REF_NO,MSS_TRANS_QTY,MSS_FREE_QTY,MSS_PUR_RATE,MSS_SELLING,MSS_TAG,MSS_BNO,MSS_CAT1,MSS_CAT2,MSS_CAT3,MSS_CAT4,MSS_CAT5,MSS_CAT6,MSS_CAT7,MSS_CAT8,MSS_CAT9,MSS_CAT10,MSS_compid,MSS_diviid,MSS_locaid,TS,MSS_BAGS FROM TMP.med_stock_sales) E
    ON (B.RETAIL_OUTLET_ID = E.RETAIL_OUTLET_ID AND B.MSS_ID = E.mss_id )
    WHEN MATCHED THEN
    UPDATE SET B.MSS_ITEMCODE = E.MSS_ITEMCODE , B.MSS_TRAN_DATE = E.MSS_TRAN_DATE , B.MSS_TRAN_TYPE = E.MSS_TRAN_TYPE , B.MSS_REF_NO = E.MSS_REF_NO , B.MSS_TRANS_QTY = E.MSS_TRANS_QTY , B.MSS_FREE_QTY = E.MSS_FREE_QTY , B.MSS_PUR_RATE = E.MSS_PUR_RATE , B.MSS_SELLING = E.MSS_SELLING , B.MSS_TAG = E.MSS_TAG , B.MSS_BNO = E.MSS_BNO , B.MSS_CAT1 = E.MSS_CAT1 , B.MSS_CAT2 = E.MSS_CAT2 , B.MSS_CAT3 = E.MSS_CAT3 , B.MSS_CAT4 = E.MSS_CAT4 , B.MSS_CAT5 = E.MSS_CAT5 , B.MSS_CAT6 = E.MSS_CAT6 , B.MSS_CAT7 = E.MSS_CAT7 , B.MSS_CAT8 = E.MSS_CAT8 , B.MSS_CAT9 = E.MSS_CAT9 , B.MSS_CAT10 = E.MSS_CAT10 , B.MSS_compid = E.MSS_compid , B.MSS_diviid = E.MSS_diviid , B.MSS_locaid = E.MSS_locaid , B.TS = E.TS , B.MSS_BAGS = E.MSS_BAGS
    WHEN NOT MATCHED THEN
    INSERT (B.RETAIL_OUTLET_ID , B.MSS_ID , B.MSS_ITEMCODE , B.MSS_TRAN_DATE , B.MSS_TRAN_TYPE , B.MSS_REF_NO , B.MSS_TRANS_QTY , B.MSS_FREE_QTY , B.MSS_PUR_RATE , B.MSS_SELLING , B.MSS_TAG , B.MSS_BNO , B.MSS_CAT1 , B.MSS_CAT2 , B.MSS_CAT3 , B.MSS_CAT4 , B.MSS_CAT5 , B.MSS_CAT6 , B.MSS_CAT7 , B.MSS_CAT8 , B.MSS_CAT9 , B.MSS_CAT10 , B.MSS_compid , B.MSS_diviid , B.MSS_locaid , B.TS , B.MSS_BAGS )
    VALUES (E.RETAIL_OUTLET_ID , E.mss_id , E.MSS_ITEMCODE , E.MSS_TRAN_DATE , E.MSS_TRAN_TYPE , E.MSS_REF_NO , E.MSS_TRANS_QTY , E.MSS_FREE_QTY , E.MSS_PUR_RATE , E.MSS_SELLING , E.MSS_TAG , E.MSS_BNO , E.MSS_CAT1 , E.MSS_CAT2 , E.MSS_CAT3 , E.MSS_CAT4 , E.MSS_CAT5 , E.MSS_CAT6 , E.MSS_CAT7 , E.MSS_CAT8 , E.MSS_CAT9 , E.MSS_CAT10 , E.MSS_compid , E.MSS_diviid , E.MSS_locaid , E.TS , E.MSS_BAGS )

    Hi
    if i re rerun the merge qry once again, the missing records inserted into REAL.AThat's exactly what you would expect. Your SQL will insert into REAL.med_stock_sales any records that are in the TEMP table but not in the REAL table - assuming the primary key is (RETAIL_OUTLET_ID, MSS_ID). So if you delete records from REAL, they will keep being repopulated from TEMP - and matching records in REAL will be updated from TEMP
    If you want to be able to delete records from REAL without this happening, you have a couple of options:
    1) when you delete from REAL, also delete from TEMP (eg using a trigger). This is simplest.
    2) when you delete from REAL, don't actually delete, just update a DELETED_YN flag
    3) when you delete from REAL, add the primary key to a DELETED_STOCK table. Then change your merge to exclude "deleted" records
    MERGE INTO REAL.med_stock_sales B
    USING (
    SELECT 1 AS RETAIL_OUTLET_ID,mss_id,MSS_ITEMCODE
       ,MSS_TRAN_DATE,MSS_TRAN_TYPE,MSS_REF_NO,MSS_TRANS_QTY,MSS_FREE_QTY
       ,MSS_PUR_RATE,MSS_SELLING,MSS_TAG,MSS_BNO
       ,MSS_CAT1,MSS_CAT2,MSS_CAT3,MSS_CAT4,MSS_CAT5,MSS_CAT6,MSS_CAT7,MSS_CAT8,MSS_CAT9,MSS_CAT10
       ,MSS_compid,MSS_diviid,MSS_locaid,TS,MSS_BAGS
    FROM TMP.med_stock_sales ss
    WHERE not exists (
        SELECT 1 FROM REAL.DELETED_STOCK ds
        WHERE ds.RETAIL_OUTLET_ID = ss.RETAIL_OUTLET_ID AND ds.MSS_ID = ss.mss_id
    ) E
    ON (B.RETAIL_OUTLET_ID = E.RETAIL_OUTLET_ID AND B.MSS_ID = E.mss_id )
    WHEN MATCHED THEN ...Hope that helps
    Regards Nigel

Maybe you are looking for

  • How do I use my apple TV on multiple TV's

    I dont want to use them at the same time. I want to take my apple TV to my ski house and use it there. I have tried but mirroing symbol does not show up on my computer

  • Loading an external swf into a target, prompting it to go to a certain frame (loadMovie)

    hello, I am making a website for myself and am having an issue with loading an swf and commanding the swf to go to a certain frame. Bassically I have one page, that has 7 seperate small thumbnail images on it which are buttons, each is commanded to o

  • ALV-Local file Disable

    Hi How to disable option available in Local File Button in a ALV Output List . That is When is Run a Report output is diaplayed then i click LOCAL File Button . It display following option (Unconverted ,Spredsheet,Richtext format,Html Format,In the C

  • Ipod touch bluetooth file transfer

    I recently asked about file transfer from an ipod touch to my Mac Mini (Lion 10.7.3) and the answer was it could not be done.  I am just an old retired mainframe systems programmer (well, Sun Solaris also) but I have dealt with a LOT of data transfer

  • When I try to delete a cookie; ANY cookie, FFx crashes.

    I recently got a rash of unfamiliar cookies, mostly containing the characters "ad". When I try to delete ANY cookie, even cookies I've deleted before, FFx crashes and takes all other windows with it. There are a LOT of these new cookies, 271 by count