Insert, select and create table as give different results

Hi all
I have a strange situation with this three cases:
1) select statement: SELECT (...)
2) insert statement with that same select as above: INSERT INTO SELECT (...)
3) create table statement again with that same select: CREATE TABLE AS SELECT (...)
Each of these cases produce different number of rows (first one 24, second 108 and third 58). What's more the data for second and third case doesn't have any sense with what they should return. The first case returns good results.
One interesting thing is that select uses "UNION ALL" between 2 queries. When simple UNION is used, everything works fine and all three cases return 24 rows. Also if each query is run seaprately, they work fine.
Anyone encountered something like this? (before i create an SR :)
Database is 10.2.0.2 on AIX 5.3. It's a data warehouse.
Edited by: dsmoljanovic on Dec 10, 2008 3:57 PM

I understand UNION vs UNION ALL. But that doesn't change the fact that same SELECT should return same set of rows wether in INSERT, CREATE TABLE AS or a simple SELECT.
DB version is 10.2.0.2.
Here is the SQL:
INSERT INTO TMP_TRADING_PROM_BM_OSTALO
select
5 AS VRSTA_PLANIRANJA_KLJUC, u1.UNOS_KLJUC, t1.TRADING_TIP_KLJUC, i1.IZVOR_KLJUC, m1.ITEMNAME AS MJESEC,
l1.PLAN AS IZNOS, l1.TEKUA AS TEKUCA, l1.PROLA AS PROSLA, l1.PLANTEKUA_ AS IZNOS_TEKUCA, l1.PLANPROLA_ AS IZNOS_PROSLA, l1.TEKUAPROLA_ AS TEKUCA_PROSLA, l1.DATUM_UCITAVANJA
from
HR_SP_PLAN.L_12_ET_PROMETI_I_BRUTO_MARZA l1,
select
m1.ITEMIID, m1.ITEMNAME
from
HR_SP_PLAN.L_12_IT_4_MJESECI m1
where
UPPER (m1.ITEMNAME) NOT LIKE '%KVARTAL%' AND UPPER (m1.ITEMNAME) NOT LIKE '%GODINA%' AND UPPER (m1.ITEMNAME) NOT LIKE '%PROC%' and
m1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy')
union all
select -99, null from dual
) m1,
HR_SP_PLAN.L_12_IT_5_SEKTORI l2,
HR_SP_PLAN.L_12_IT_2_TIPOVI_OSTALO l3, HR_SP_PLAN.D_UNOS u1, HR_SP_PLAN.D_TRADING_TIP t1, HR_SP_PLAN.L_12_IT_1_PROMET_I_BM_OSTALO p1, HR_SP_PLAN.D_IZVOR i1
where
l1.ELIST = l2.ITEMIID and
l2.ITEMNAME = u1.UNOS_NAZIV and u1.USER_KLJUC = 12 and l2.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
l1.DIMENSION_1_PROMET = p1.ITEMIID and
p1.ITEMNAME = i1.IZVOR_NAZIV and i1.USER_KLJUC = 12 and p1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
nvl(l1.DIMENSION_4_MJESEC , -99) = m1.ITEMIID and
l1.DIMENSION_2_TIPOVI = l3.ITEMIID and
l3.ITEMNAME = t1.TRADING_TIP_NAZIV and l3.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
l1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
'PROC' = 'PLAN'
union all
select
4 AS VRSTA_PLANIRANJA_KLJUC, u1.UNOS_KLJUC, t1.TRADING_TIP_KLJUC, i1.IZVOR_KLJUC, m1.ITEMNAME AS MJESEC,
l1.PROCJENA AS IZNOS, l1.TEKUA AS TEKUCA, l1.PROLA AS PROSLA, l1.PROCJENATEKUA_ AS IZNOS_TEKUCA, l1.PROCJENAPROLA_ AS IZNOS_PROSLA, l1.TEKUAPROLA_ AS TEKUCA_PROSLA, l1.DATUM_UCITAVANJA
from
HR_SP_PLAN.L_13_ET_PROMETI_I_BRUTO_MARZA l1,
select
m1.ITEMIID, m1.ITEMNAME
from
HR_SP_PLAN.L_13_IT_4_MJESECI m1
where
UPPER (m1.ITEMNAME) NOT LIKE '%KVARTAL%' AND UPPER (m1.ITEMNAME) NOT LIKE '%GODINA%' AND UPPER (m1.ITEMNAME) NOT LIKE '%PROC%' and
nvl(ceil(to_number(m1.ITEMNAME)/3), mod(4, 5)) = mod(4, 5) and m1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy')
union all
select -99, null from dual
) m1,
HR_SP_PLAN.L_13_IT_5_SEKTORI l2, HR_SP_PLAN.L_13_IT_2_TIPOVI_OSTALO l3,
HR_SP_PLAN.D_UNOS u1, HR_SP_PLAN.D_TRADING_TIP t1,
HR_SP_PLAN.L_13_IT_1_PROMET_I_BM_OSTALO p1, HR_SP_PLAN.D_IZVOR i1
where
l1.ELIST = l2.ITEMIID and
l2.ITEMNAME = u1.UNOS_NAZIV and u1.USER_KLJUC = 13 and l2.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
l1.DIMENSION_1_PROMET = p1.ITEMIID and
p1.ITEMNAME = i1.IZVOR_NAZIV and i1.USER_KLJUC = 13 and p1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
nvl(l1.DIMENSION_4_MJESEC , -99) = m1.ITEMIID and
l1.DIMENSION_2_TIPOVI = l3.ITEMIID and
l3.ITEMNAME = t1.TRADING_TIP_NAZIV and l3.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
l1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
'PROC' = 'PROC';

Similar Messages

  • Possible solution to avoid deadlock when two inserts happen on same table from two different machines.

    Possible solution to avoid deadlock when two inserts happen on same table from two different machines.
    Below are the details from deadlock trace.
    Deadlock encountered .... Printing deadlock information
    Wait-for graph
    NULL
    Node:1
    KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
    Grant List 2:
    Owner:0x00000013F494A980 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:376 ECID:0 XactLockInfo: 0x000000055014F400
    SPID: 376 ECID: 0 Statement Type: INSERT Line #: 70
    Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
    Requested by:
    ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
    NULL
    Node:2
    KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
    Grant List 2:
    Owner:0x0000000B3486A780 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:238 ECID:0 XactLockInfo: 0x0000002AA53383F0
    SPID: 238 ECID: 0 Statement Type: INSERT Line #: 70
    Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
    Requested by:
    ResType:LockOwner Stype:'OR'Xdes:0x000000055014F3C0 Mode: RangeI-N SPID:376 BatchID:0 ECID:0 TaskProxy:(0x000000080426E538) Value:0x30614e80 Cost:(0/41748)
    NULL
    Victim Resource Owner:
    ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
    deadlock-list
    deadlock victim=process5daddc8
    process-list
    process id=process5daddc8 taskpriority=0 logused=38828 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994026815 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.347 XDES=0x2aa53383b0 lockMode=RangeI-N schedulerid=43 kpid=14156 status=suspended spid=238 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.463 lastbatchcompleted=2014-07-25T12:46:57.463 clientapp=pa hostname=pa02 hostpid=1596 loginname=myuser isolationlevel=serializable (4) xactid=2994026815 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
    executionStack
    frame procname=mydb.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
    INSERT INTO [dbo].[Prod1] .....
    inputbuf
    Proc [Database Id = 8 Object Id = 89923542]
    process id=process5d84988 taskpriority=0 logused=41748 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994024748 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.320 XDES=0x55014f3c0 lockMode=RangeI-N schedulerid=39 kpid=14292 status=suspended spid=376 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.440 lastbatchcompleted=2014-07-25T12:46:57.440 clientapp=pa hostname=pa01 hostpid=1548 loginname=myuser isolationlevel=serializable (4) xactid=2994024748 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
    executionStack
    frame procname=pa.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
    INSERT INTO [dbo].[Prod1]....
    inputbuf
    Proc [Database Id = 8 Object Id = 89923542]
    resource-list
    keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
    owner-list
    owner id=process5d84988 mode=RangeS-S
    waiter-list
    waiter id=process5daddc8 mode=RangeI-N requestType=convert
    keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
    owner-list
    owner id=process5daddc8 mode=RangeS-S
    waiter-list
    waiter id=process5d84988 mode=RangeI-N requestType=convert

    Don't know. Perhaps these can help. I scanned the second link but didn't see much about Ending Deadlocks. I'd say the Fourth link probably has better information than the first three links. But maybe read them all just in case the Fourth is missing something
    one of the first three have.
    Deadlocking
    Detecting and Ending Deadlocks
    Minimizing Deadlocks
    Handling Deadlocks in SQL Server
    Google search for "SQL Deadlock"
    La vida loca

  • Way to programmatically drop-and-create-tables?

    Hi all,
    I have a persistence unit which exists to provide lookup information to my application. It is populated by data that is available at runtime. It takes a long time to parse this data, and therefore my intention is to only parse it once at the deployment target. To do this, I have created a main method that does all the parsing, and I do not set the toplink.ddl-generation property in persistence.xml. This causes the application to fail if the database is not created.
    However, this means that during the population stage, I must drop and create any existing tables. I had thought it would be possible to do this by obtaining an EntityManagerFactory which has a property map sent to it, containing the property toplink.ddl-generation set to drop-and-create-tables. But this does not work... the tables are not dropped (if they exist) and are not created (if the database is empty).
    Is it possible to do the drop-and-create-tables programmatically using the JPA?
    I may have another EntityManagerFactory open at the same time, which has been opened with the default options... would this be conflicting?

    I don't think there is any easy way to generate the default tables once your have created the EntityManagerFactory. You could use the EclipseLink/TopLink schemaframework or TableCreator to create tables using a EclipseLink/TopLink DatabaseSession.
    There is a DefaultTableGenerator in org.eclipse.persistence.tools.schemaframework, which may give you what you are looking for.
    -- James : http://www.eclipselink.org

  • Expdp fail and create table SYS_EXPORT_SCHEMA_20

    Hi Gurus
    I am using Oracle 10.2.0.3 in AIX env
    My database size is around 1600 GB. Sometime my expdp fail and create table like SYS_EXPORT_SCHEMA_20, SYS_EXPORT_SCHEMA_05. As I run expdp from system user , I notice that it create this type of table into system tablespace. It time it consume around 5gb space. Now my system tablespace size is 68 GB.
    Can I drop those table? If I drop these table then it create any problem? This is my production database.
    Regards
    Rabi

    user13134974 wrote:
    Hi Gurus
    I am using Oracle 10.2.0.3 in AIX env
    Regards
    RabiThose tables you were mentioning, SYS_EXPORT_SCHEMA_nn , are the data pump master tables used for data pump jobs;their purpose is to
    hold the info about the job details.
    Once the job has finished table should be droped, but in case of a job failure table remains so every new dp job must create new SYS_EXPORT_SCHEMA_nn table
    with the +1 nn iteration depending on the name of the last master table that was left due to the dp job failure.
    Cleaning those tables can be done with the dbms_datapump STOP_JOB Procedure, check the docs about the details :
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10825/dp_export.htm
    You can also go visit youroracle support to see examples and instructions for cleaning your db from those dismised master tables,
    How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ? [ID 336014.1]

  • Do IMAQ Cast Image or IMAQ Linear averages give different results when using different computers that are running under Windows XP ?

    Hello
    I'm currently developping an image processing algorithm using Labview 7.1 and the associated IMAQ Vision tools. After several tests, I found a weird result. Indeed, I put the labview algorithm - including the IMAQ VI on the library to get sure that I use all the time the same VI - on my memory stick and used it on two different computers. I tested the same picture (still in my memory stick) and had two very different results.
    After several hours trying to understand why, I found that there were a difference between the results given by both computers at the very begining of the algorithm. Indeed, I used a JPEG file.
    To open it, I first create an Image with IMAQ Create (U8). Then, I open it.
    Then in my first sub-VI, I use IMAQ Cast Image to be sure that the picture is a U8 grayscale picture.
    Right after that, I use the IMAQ Linear Averages. The results of this VI are different on the two computers.
    I tried several time on the same picture : one computer always give me the same result but the two computers give me a different result. So there is no random variable on the results.
    So my question is : Do IMAQ Cast Image or IMAQ Linear averages give different results when using different computers that are running under Windows XP ?
    My bet is on IMAQ Cast Image but I'm not quite sure and I do not undestand why. The labview and IMAQ are the same on both computers.
    The difference between the two computer are above :
    Computer 1 :
    Pentium(R) 4 CPU 3.20GHz with a RAM of 1Go. The processor is an Intel(R).
    The OS is windows XP Pro 2002
    Computer 2 :
    Pentium(R) 4 CPU 2.80GHz with a RAM of 512Mo. The processor is an Intel(R).
    The OS is windows XP Pro 2002.
    If anybody can help me on this problem, it would be really helpful.
    Regards
    Florence P.

    Hi,
    Indeed it's a strange behaviour, could you send me your VI and your JPEG file, (or another file that reproduces) so that I could check this inthere ?
    I'll then try to find out what's happening.
    Regards
    Richard Keromen
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Découvrez, en vidéo, les innovations technologiques réalisées en éco-conception

  • How to Insert-Select and Updade base table

    Hi All,
    How is the best way to do this?
    I have a table A that has 1million rows.
    I need to Insert-Select into table B from a Group by on table A,
    and Update all rows in table A that were used into Insert with a flag.
    (select a hundred from A and insert 10 thousands into B)
    What to do?
    1-Update table A with flag before Insert-Select?
    2-Insert-Select group by into table B, before Update?
    3-Another way?
    Thanks in advance,
    Edson

    Either way. But you may find that updating the source flag first and then using that flag as part of your where clause when extracting rows to put in the destination table is a bit faster.
    In any case, you will commit only once after all of the work is done.

  • How to create stored procedure to drop and create table

    Version: Oracle 10g
    I am trying to create a stored procedure that will drop and create a table based on a select statement. I can create the table but I can't drop it.
    CREATE OR REPLACE procedure EC_LOAD is
    begin
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    from
    sales_revenue;
    end ecload;
    I need to drop Sales_table before inserting the values. How do i do this?

    Or with a drop:
    SQL> desc emp2
    ERROR:
    ORA-04043: object emp2 does not exist
    SQL>
    SQL> declare
      2    cnt      int := 0;
      3  begin
      4    select max (1)
      5      into cnt
      6      from user_tables
      7     where table_name = 'EMP2';
      8
      9    if cnt = 1
    10    then
    11      execute immediate 'drop table emp2';
    12    end if;
    13
    14    execute immediate 'create table emp2 as select * from emp';
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> desc emp2
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    SQL>

  • Insert data from a table into 5 different tables

    My application has a data block than display information from another table. From this data block, the user has the option to select the records for upload. The information in the data block is used to insert data into 5 different tables. So if any exception occurs while inserting, the whole process should be rollback, but before this happen a record is inserting in a failed table indicated the reason of the failed.
    For this process I use the following commands:
    1.     sp_name := Get_Application_Property(SAVEPOINT_NAME);
    2.     INSERT DDL
    3.     INSERT DDL
    4.     INSERT DDL
    5.     INSERT DDL
    6.     INSERT DDL
    7.     If Other Exception then ISSUE_ROLLBACK(sp_name) Otherwise FORMS_DDL ('commit')
    The problem the previous insert(s) rollback
    Thanks,

    Hi,
    If you are using FORMS_DDL built-in to insert the data, then after each FORMS_DDL statement, you have to check the values of FORM_SUCCESS or FORM_FAILURE built-ins.
    FORMS_DDL('<insert_statement_1>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;
    FORMS_DDL('<insert_statement_2>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;Hope this helps.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Why not exists and minus give different result

    HI,
    I am writing thes query by using two different operators they should give me the same output but they dont. Please can anybody explain why they give different output.
    query 1
    SQL> SELECT COUNT(*) FROM
    2 (select orig_idx
    3 from rel15_au_poi a
    4 MINUS
    5 SELECT ORIG_IDX
    6 FROM REL14_1_AU_POI_INTERM B) ;
    COUNT(*)
    244312
    query 2
    SQL> select count(*)
    2 from rel15_au_poi a
    3 where not exists
    4 (select null from rel14_1_au_poi_interm b where a.orig_idx=b.ORIG_IDX) ;
    COUNT(*)
    245341
    best Regards,

    Because you have duplicates in rel15_au_poi which are counted with exists and removed with minus.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries004.htm#sthref3147
    MINUS Example
    The following statement combines results with the MINUS operator, which returns only unique rows returned by the first query but not by the second:
    SELECT product_id FROM inventories
    MINUS
    SELECT product_id FROM order_items;

  • CL_GUI_ALV_GRID: Line selection and backend table

    Dear community,
    is there a way to propagate line selection of ALV GRID GUI automagically to the backend data table?
    This is my scenario:
    1) A table containing several records with one column 'SELECTED' for selection status
    2) ALV_GRID to display the table with layout info for line selection
    alv_layo-sel_mode   = 'A'.
    alv_layo-box_fname  = 'SELECTED'.
    3) At PBO methods set_table_for_first_display and refresh_table_display are called with the table containing some records marked as 'SELECTED'.
    First problem here: 'SELECTED' entries are not propagated to the ALV grid (the lines in the GUI are not marked). I know I could use set_selected_rows to force the selection, but is this really necessary?
    4) Then, at PAI method check_changed_data is called (and yes, event mc_evt_modified is registered).
    Second problem: Changes in selection are not propagated automagically to the underlying table. I also know I could use get_selected_rows to force this update manually, but again: is this really necessary?
    Can anyone explain the behavior why sorting etc. is propagated automatically to the underlying table, but not the selection of rows? Am I missing something?
    Hint: Removing box_fname = 'SELECTED' and setting the fieldcatalog to display the column 'SELECTED' as editable checkbox works also. But our users are familiar with the rowmark, so this is no option.
    Any suggestions are welcome.
    Thanks,
    Torsten.
    Here an (almost) complete listing of the code:
    PROCESS BEFORE OUTPUT.
      MODULE SET_STATUS_TITLE_0100.
      MODULE INIT_ALV_GRID_0100.
      MODULE DISPLAY_DATA_0100.
      MODULE SET_GRID_SELECTION_0100.
    PROCESS AFTER INPUT.
      MODULE EXIT_COMMAND_0100 AT EXIT-COMMAND.
      MODULE UPDATE_TABLE_DATA_0100.
      MODULE USER_COMMAND_0100.
    MODULE init_alv_grid_0100 OUTPUT.
      IF NOT gr_container IS BOUND.
    *   Container erzeugen
        CREATE OBJECT gr_container ...
    *   ALV Grid erstellen
        CREATE OBJECT gr_alv_grid ...
    *   ALV für die erste Anzeige vorbereiten
        gs_alv_layo-zebra      = on.         " Gestreifte Anzeige
        gs_alv_layo-no_toolbar = on.         " Keine Toolbar
        gs_alv_layo-no_rowmark = off.        " Keine Zeilenmarkierung
        gs_alv_layo-edit       = off.        " Editieren ermöglichen
        gs_alv_layo-sel_mode   = 'A'.        " Selektionsmodus
        gs_alv_layo-cwidth_opt = off.        " Optimierte Spaltenbreite!
        gs_alv_layo-info_fname = 'LCOLOR'.   " ALV-Control: Feldname mit
                                             " einfacher Farbcodierung für
                                             " Zeile
        gs_alv_layo-ctab_fname = 'CCOLOR'.   " ALV-Control: Feldname mit
                                             " komplexer Farbcodierung
                                             " für Zellen
        gs_alv_layo-box_fname  = 'SELECTED'. " Markierte Zeilen
    *   Feldkatalog für die Anzeige vorbereiten
    *    CLEAR gs_fcat.                       " Mehrfachsel. ermöglichen
    *    gs_fcat-fieldname = 'SELECTED'.      " Dazu muss das Feld für die
    *    gs_fcat-edit      = on.              " Selektion editierbar sein.
    *    gs_fcat-checkbox  = on.              " Ausserdem muss die
    **   gs_fcat-outputlen = '3'.             " Zeilenmark. eingeschaltet
    *    APPEND gs_fcat TO gt_fcat.           " und box_fname gesetzt sein.
    *   Ereignisbehandlung
        SET HANDLER
          lcl_event_handler=>on_click
          lcl_event_handler=>on_hotspot
          lcl_event_handler=>on_double_click
          lcl_event_handler=>on_user_command
          lcl_event_handler=>on_data_changed
        FOR gr_alv_grid.
        CALL METHOD gr_alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified
          EXCEPTIONS
            error      = 1
            OTHERS     = 2.
      ENDIF.
    ENDMODULE.                 " INIT_ALV_GRID_0100  OUTPUT
    MODULE display_data_0100 OUTPUT.
    * PBO Modul für alle weiteren Anzeigezyklen.
      IF gr_alv_grid IS BOUND.
        CALL METHOD gr_alv_grid->set_table_for_first_display ...
      ENDIF.
    ENDMODULE.                 " DISPLAY_DATA_0100  OUTPUT
    MODULE set_grid_selection_0100 OUTPUT.
      IF gr_alv_grid IS BOUND.
        CALL METHOD gr_alv_grid->refresh_table_display.
      ENDIF.
    * Alterative: Set selected rows manually
    *    CALL METHOD gr_alv_grid->set_selected_rows
    ENDMODULE.                 " SET_GRID_SELECTION_0100 OUTPUT
    MODULE update_table_data_0100 INPUT.
        CALL METHOD gr_alv_grid->check_changed_data.
    * Alternative: Get selected rows and update table manually
    *    CALL METHOD gr_alv_grid->get_selected_rows ...
    ENDMODULE.                 " UPDATE_TABLE_DATA_0100  INPUT

    Hello Torsten
    I may be wrong but I think the field LVC_S_LAYO-BOX_FNAME is a relict from the stone-age SLIS-based ALV programming.
    Using modern OO-based ALV we do not need any kind of "MARK" row but we have the appropriate methods available.
    Regards
      Uwe

  • PLSQL and Create Table

    Hi
    I was wondering whether someone would help me with my first ever piece of PLSQL. I am trying to embed a create table as select statement into a PLSQL loop so that I can create a number of tables automatically. I am unclear as to whether this is possible or not, but my attempts so far has been unsucessful. My code so far is as follows:
    declare
    l_loops number :=1;
    begin
    loop
    if l_loops > 4 then
    exit;
    end if;
    create table l_loops as select year, month from caadatanum
    where month = l_loops;
    l_loops := l_loops +1;
    end loop;
    end;
    I am trying to use the loop to change the where condition
    as it loops through. The error message I get tells me
    that it doesn't expect the create statement so I am quite confused. Any help anyone could give me would be greatly appreciated.
    Thanks
    John

    Hi
    Firstly can I thanks you all for your help. The code no runs ok apart from one thing. It concerns the labelling of the table itself
    so 'create table '||l_loops||' as select ...
    errors with invalid table name presumably because it doesn't like giving tables numbers as names. I have tried
    'create table '||to_char(l_loops)||' as select .. but to no avail
    Is it possible to concatenate the l_loops number with a string somehow to get the statement to work ?
    create table mytable||'||l_loops||' doesn't work so I am not really sure what to do.
    Once again thanks
    John

  • Same C++ code gives different result in MacOSX and Ubuntu

    Hi
    I have a C++ program which starts by reading an external file, but changing the name of the file give me different results.
    I selected just the important part and made a simple file with the reading part of my program and can be downloaded here
    http://dl.dropbox.com/u/664351/files.zip
    It just reads the external file and does the output of some values.
    It has two external file examples. If one uses "x.txt" everything works fine, but if we use "dados.txt", which is a copy of "x.txt", the last value in the output is wrong.
    The stranger is that if i use these same files in ubuntu everything works just fine!
    I tried in a MacBook, a MacBook Pro and an iMac (all of them with macosx 10.6) and i always got the error, but not on ubuntu!
    Does anyone has a clue about what is happening here?
    Cheers,
    Marcelo

    marcelobarbosa wrote:
    Does anyone has a clue about what is happening here?
    Change OutFile from a 20 byte character array to a string. GCC isn't able to tell what type that is and is picking int or something, corrupting your memory.

  • Same code gives different results in Matlab Script in Labview and Matlab

    I am implemeting a Matlab code into a LabVIEW application using Matlab script. When I import the exactly same code to the Matlab Script in LabVIEW it gives a different result than it is in Matlab. This code is a simulation code including first kind bessel functions. Using LabVIEW 7.1 and Matlab R14 service pack 3.

    Labview 8.5
    Matlab R2009b
    Attached are the graphs produced by matlab script in labview and in matlab.
    The minimum of graph produced by matlab code is below 1 and that in labview is above 1.
    Thanks a lot for your reply.
    Sorry, I haven't quantified the "sometimes" yet. 
    Attachments:
    matlabsResult.jpg ‏29 KB
    LV.png ‏84 KB

  • Need a document about how to move the fact and dimension table's to different server's

    Hello Experts,
    I need a detailed doc on how to move the fact and dimension tables to different server's.Please help me out from this
           Thanks in advance....

    You still haven't told anyone what products besides Essbase you are using, without which this is an impossible question to answer.
    https://forums.oracle.com/thread/2585515
    https://forums.oracle.com/thread/2585171
    Are you connecting to these tables from Essbase with a load rule / ODBC?  Using Studio?  Using Integration Services?  Any Drill-Through reporting set up?
    This may sound harsh, but if you truly don't know how to answer any of these questions you should probably not be anywhere near this task...

  • Inserted video and audio in main project different volumes

    I have inserted a video into a Captivate 5 project that has audio on most slides. When I publish and play the project, the video plays at a much lower volume than the rest of the project.  Is there a way to even out the volume between inserted videos and the rest of the project?

    I'm working in Captivate 7, and I'm also seeing this issue.  I found a similar conversation, and I'm afraid it's a known issue with the way the video is set when it comes in.  According to this, it's set to 50% volume when it's brought in.
    http://forums.adobe.com/message/4488209#4488209
    I'd love to hear of a work-around.  My audio voiceover tracks are loud and clear.  This one video is really disappointing because of the audio.
    Hoping for a solution...

Maybe you are looking for

  • Instance name and Var for Input Text fields

    I have several Input Text fields, as a form, linked to a PHP script for which I require Var's for each field. But I also need Instance names for each field, so I can fix the tabIndex. Yet, everytime I test my movie, the text fields have their Paths (

  • External Service Order

    Hi can u expalin indetail External service Order thankq

  • Download folder : what is it made for ?

    Hi everyone, I noticed a large file in my "Download folder" in iTunes folder. I suppressed it- In fact, now, I wonder if I did well ? What is this "Download folder" for ? Can I suppress files from it ? (to late for the one I already erased of course

  • Adobe Application Manager Hangs and Won't Load

    I am a Creative Cloud subscriber I manually uninstalled Acrobat XI -- I know, bad idea, I shouldn't have done that, but now it is what it is ... So now I cannot run Adobe Application Manager without it hanging I downloaded and installed the AAM patch

  • E71 wifi and maps issues.

    Does anyone have this problem and know how to fix it? the problem i have is trying to save the maps through wifi (i dont want to use packet data, dont have a plan, although it works and im gonna regret fiddling with it when i get my bill).... it just