In which version of database this Insert statement works

I have a table MASTER_TABLE with records , I just inserting records from master_table to child_table
below insert statement works, i just want to know from which version of database this feature is available.
INSERT INTO (SELECT VNAME,VNUMBER FROM CHILD_TABLE )
SELECT VNAME,VNUMBER FROM MASTER_TABLE
Edited by: Balajiraam on Dec 22, 2011 3:55 AM

But what is your specific need to choose this syntax??
You can just write
insert into child_table
select col1,col2 from master_table;
to be in safer side..

Similar Messages

  • Just downloaded Numbers spreadsheet... I entered a simple "if" statement...If(c2=0,9,7) just to see how it works.... But I get an error message "Argument 1 of if expects a Boolean but found "c2=0....This if statement works fine in Excel

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

  • What is wrong with this INSERT statement?

    I know this has been covered many times but I cannot figure out why I am getting a syntax error for this prepared Statement INSERT...any help is greatly appreciated:
    PreparedStatement pstmt = con.prepareStatement("insert into hold (idnum, date_field) values (?,?)");
    pstmt.setString(1, idnum);
    pstmt.setString(2, date_field);
    pstmt.executeUpdate();
    thanks,
    Chuck

    still have trouble, cannot find an answer that works in the forum anywhere. Using Access 2000 trying to INSERT into a memo field I am getting an error, "SQLException caught: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. ". I have the following code:
    first I am getting the parameter (using a servlet) from the form submit:
    String desc = req.getParameter("desc");
    then, I am using a prepared Statement:
    PreparedStatement pstmt = con.prepareStatement("insert into hold (idnum, date_field, time_field, author, title, desc) values (?,?,?,?,?,?)");
    pstmt.setString(1, idnum);
    pstmt.setString(2, date_field);
    pstmt.setString(3, time_field);
    pstmt.setString(4, author);
    pstmt.setString(5, title);
    pstmt.setObject(6, desc, java.sql.Types.LONGVARCHAR);
    pstmt.executeUpdate();
    incidentally, the text string is only 20 characters in my tests.
    Any help is greatly appreciated (or working code examples)
    thanks in advance,
    Chuck

  • Which Version of Adobe Acrobat Pro Wiil Work?

    Hi;
    I've got a flat-panel iMac running OS 10.3.9 and I need to get Adobe Acrobat Pro. Which version will work with my configuration and where could I find it? I tried the Adobe site and got nowhere.
    Thanks!

    Hello again, Cornelius:
    I found a source to obtain an OEM version of Acrobat Pro 8. I'm wondering if you think it would be good (the price is certainly right!):
    http://www.winsoftware.org/software/mac/adobe/adobeacrobat_8_professionalmac.html
    Thanks again.
    Warren

  • Which version of Final Cut Pro will work with Mac Book 10.75?

    I can not put Final Cut Pro 9 on my Mac Book 10.75 (Lion).
    Which version of Final Cut Pro will run on Mac Book 10.75 (Lion).
    Thanks

    Ok, first, your questions's answers:
    FCS1 had a full version & an upgrade from any version of FCP. You only need the serial # handy when installing FCS upgrade.
    Now FCS2 has TWO upgrade versions: one was for FCS1 ($499), the other was from any version of FCP ($699).
    NOTE: Academic and Not-For-Resale (NFR) versions are not eligible for upgrade.
    http://gizmodo.com/252425/apple-rolls-out-final-cut-studio-2-first-impressions
    Here's something else to consider: with the march away from the PPC as a whole & your upgrade cost to FCS3 is $299, I would be very careful how much you spend for the older copies.
    If FCS1 or 2 is too hard to come by or cost what it did originally (or more), you may want to consider picking up a (used or new) Intel Mac with ATI or Nvidia graphics. even the newest mini might surpise you & get you by until you can afford something else.
    Good luck!

  • How does this IMPORT statement works

    can any one tell me how does this statement will work..
    I am wokring on Solution manager system , where in there is a function module SSF_FIELD_LIST
    to which system passes form name.
      import fields to fieldlist
             from database stxfcontr(sf) id l_fullname.
    stxfcontr is a table which contains value of in  a diff
    Regards,
    mayank

    It will import data object stored in memory under named fields to your custom data object fieldlist .
    The table which it is stored is name stxfcontr under RELID (memory area) SF .
    Cluster key (key of the entry) in that table is behind var l_fullname
    Anyhow I think [this link|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm] is more that any explanation. Once you study it, you will understand the above.
    Regards
    Marcin

  • Why won't this MERGE statement work?

    I am testing out a MERGE statement, which contains a subquery that will return no rows...on this condition, it should insert a record; however I get 0 records merged. Why is this?
    Ultimately, the hard-coded values will actually be passed in as parameters. If those a record with those four values is not found, then it should insert.
    MERGE INTO tb_slea_election_worksheet A
    USING 
    (SELECT i.slea_year,i.empid,i.bda_sum_sort,i.bda_dtl_sort FROM tb_slea_election_worksheet i
    WHERE  slea_year = '2008'
    AND empid = '6468T'
    AND bda_sum_sort = '30'
    AND bda_dtl_sort = '9999'
    ) B
    ON (A.slea_year = B.slea_year
    AND A.empid =B.empid
    AND A.bda_sum_sort  = B.bda_sum_sort
    AND A.bda_dtl_sort  = B.bda_dtl_sort) 
    WHEN MATCHED THEN
      UPDATE SET A.fa_proj_exp_amt  = 888
    WHEN NOT MATCHED THEN
      INSERT    (slea_year,empid,bda_sum_sort,bda_dtl_sort,act_exp_lst_yr,fa_proj_exp_amt)
      VALUES ( '2008','6468T','30','9999','0','55');

    A merge statement is just a much more efficient way of doing something like this pl/sql block
    DECLARE
       l_n NUMBER;
    BEGIN
       FOR r IN (SELECT pk, col1, col2 FROM source) LOOP
          BEGIN
             SELECT 1 INTO l_n
             FROM target
             WHERE pk = r.pk;
             UPDATE target
             SET col1 = r.col1,
                 col2 = r.col2
             WHERE pk = r.pk;
          EXCEPTION WHEN NO_DATA_FOUND THEN
             INSERT INTO target
             VALUES(r.pk, r.col1, r.col2);
          END;
       END LOOP;
    END;So, if the select from source returns no rows, nothing is going to happen.
    John

  • PDF Forms - Which versions of Acrobat / Reader do they work in?

    I'm trying to persuade a client to start using pdf forms that I've created in the latest Adobe Acrobat Pro.
    I've tested the forms using Adobe Reader 8 & 9 on the Mac. The two versions work differently but I've come up with a work-around solution that means I can give the same advice to users of both versions of Reader.
    But I could do with knowing if pdf forms work in earlier versions of Acrobat / Reader? Macs & PCs?
    And if they don't work, what sort of warning will come up on screen? Ie. Will it say that they need to upgrade to the latest version of Adobe Reader and give a link? - which would be good! Or will some other error message come up that will just cause confusion?
    Has Adobe published any advice anywhere?

    The Forms Creation where you use filliable forms that can be saved and attached to email, (500 returns max - using the Advanced > Extend Features in Reader). Works also in version 7 or reader. Nothing below 7 will work.

  • Why doesn't this case statement work?

    SELECT
    case when PRODUCTS.PRODUCT_NAME in
    select case when rank() over(order by ( sum(ag.RX_CNT) ) desc) < 6 then ( p.PRODUCT_NAME ) else 'XXXX' END RankedProduct
    FROM
    PAP_MONTHLYTIME_DIM m,
    PAP_PRESCRIPTIONS_DEMOG_AGG ag,
    PRODUCTS p,
    PAP_ENROLLMENT_FLAGS_DIM f
    WHERE
    ( m.MONTHLYTIME_DIM_ID = ag.MONTHLYTIME_DIM_ID )
    AND ( ag.ENROLLMENT_FLAGS_DIM_ID = f.ENROLLMENT_FLAGS_DIM_ID )
    AND ( p.PRODUCT_ID = ag.PRODUCT_DIM_ID )
    AND ( f.ACTIVE_FLAG = 'Y' )
    AND m.CALENDAR_YEAR_MONTH = '2007-04'
    GROUP BY
    m.MONTH_END_DATE,
    p.PRODUCT_NAME
    then
    ( PRODUCTS.PRODUCT_NAME ) else 'All Other' end as ProdNm,
    PRODUCTS.PRODUCT_NAME,
    sum(PAP_PRESCRIPTIONS_DEMOG_AGG.RX_CNT)
    FROM
    PRODUCTS,
    PAP_PRESCRIPTIONS_DEMOG_AGG
    WHERE
    ( PRODUCTS.PRODUCT_ID=PAP_PRESCRIPTIONS_DEMOG_AGG.PRODUCT_DIM_ID )
    GROUP BY
    PRODUCTS.PRODUCT_NAME
    The first case statement is not working properly. First off - I know I can do this without the subquery in the case statement, but it's then tied to the Month and I don't want that.
    The result set of the subquery contains valid product_names that match EXACTLY (I added LTRIM RTRIM just in case), but the ProdNm field still evaluates to "All Other" for them. If I change the subquery to something basic and remove the rank function, it works, but of course I need that function. My understanding is that it shouldn't matter what function is in the subquery. I thought Oracle would get the result set of the subquery first, then evaluate the case statement based on the result set (the subquery is obviously not correlated).
    Any ideas?
    Thanks.

    My understanding is that it shouldn't matter what function is in the subquery. I thought Oracle would get the result set of the subquery first, then evaluate the case statement based on the result set (the subquery is obviously not correlated). It looks like the queries ARE somehow correlated. Consider the two simplified queries:
    michaels>  SELECT   ename, deptno,
             CASE
                WHEN deptno IN (
                       SELECT CASE
                                 WHEN ROW_NUMBER () OVER (ORDER BY NULL) < 3
                                    THEN deptno
                                 ELSE 1000
                              END
                         FROM dept)
                   THEN 'Found'
                ELSE 'NOT Found'
             END FOUND
        FROM emp
    ORDER BY deptno
    ENAME          DEPTNO FOUND   
    CLARK              10 NOT Found
    KING               10 NOT Found
    MILLER             10 NOT Found
    JONES              20 NOT Found
    FORD               20 NOT Found
    ADAMS              20 NOT Found
    SMITH              20 NOT Found
    SCOTT              20 NOT Found
    WARD               30 NOT Found
    TURNER             30 NOT Found
    ALLEN              30 NOT Found
    JAMES              30 NOT Found
    BLAKE              30 NOT Found
    MARTIN             30 NOT Found
    michaels>  SELECT   ename, deptno,
             CASE
                WHEN deptno IN (
                       SELECT *
                         FROM (SELECT CASE
                                         WHEN ROW_NUMBER () OVER (ORDER BY NULL) < 3
                                            THEN deptno
                                         ELSE 1000
                                      END
                                 FROM dept))
                   THEN 'Found'
                ELSE 'NOT Found'
             END FOUND
        FROM emp
    ORDER BY deptno
    ENAME          DEPTNO FOUND   
    CLARK              10 Found   
    KING               10 Found   
    MILLER             10 Found   
    JONES              20 Found   
    FORD               20 Found   
    ADAMS              20 Found   
    SMITH              20 Found   
    SCOTT              20 Found   
    WARD               30 NOT Found
    TURNER             30 NOT Found
    ALLEN              30 NOT Found
    JAMES              30 NOT Found
    BLAKE              30 NOT Found
    MARTIN             30 NOT FoundSo in the first query ROW_NUMBER() evaluates to NULL (not sure why) so the condition will never be satisfied! This is easily proofed when actually testing for nullity:
    WHEN ROWNUM() OVER (ORDER BY NULL) IS NULL THEN
    ...will always show 'Found'!
    Inlining the subquery »materializes« it, and ROW_NUMBER() gets the desired value.

  • Using sqlerrm in insert statement in 10g

    Hi,
    I do not have 10g to test the following snippet, which tries to use sqlerrm in an insert statement:
    -- start testcase
    drop table tbl;
    drop table err;
    create table tbl (x number);
    create table err (a number, b varchar2(4000));
    declare
      n_tmp   tbl.x%type;
    begin
      select x into n_tmp from tbl;
    exception
      when others then
        -- the line below works in 9i
        -- dbms_output.put_line('Sqlerrm: '||sqlerrm);
        -- but the insert statement doesn't work in 9i, how about 10g ?
        insert into err(a,b) values (1,sqlerrm);
        commit;
    end;
    declare
      n_tmp   tbl.x%type;
    begin
      select x into n_tmp from tbl;
    exception
      when others then
        -- the line below works in 9i
        -- dbms_output.put_line('Sqlerrm: '||sqlerrm);
        -- the insert statement works in 9iR2 but the error message is
        -- not the one sought, how about 10g ?
        insert into err(a,b) values (1,sys.standard.sqlerrm);
        commit;
    end;
    /Can someone test it on any release/edition of 10g please ?
    The tests on 9iR2 below behave predictably:
    SQL>
    SQL> @ver
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE    9.2.0.8.0       Production
    TNS for Solaris: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    SQL>
    SQL>
    SQL> -- start testcase
    SQL> drop table tbl;
    Table dropped.
    SQL> drop table err;
    Table dropped.
    SQL>
    SQL> create table tbl (x number);
    Table created.
    SQL> create table err (a number, b varchar2(4000));
    Table created.
    SQL>
    SQL> declare
      2    n_tmp   tbl.x%type;
      3  begin
      4    select x into n_tmp from tbl;
      5  exception
      6    when others then
      7      -- the line below works in 9i
      8      -- dbms_output.put_line('Sqlerrm: '||sqlerrm);
      9      -- but the insert statement doesn't work in 9i, how about 10g ?
    10      insert into err(a,b) values (1,sqlerrm);
    11      commit;
    12  end;
    13  /
        insert into err(a,b) values (1,sqlerrm);
    ERROR at line 10:
    ORA-06550: line 10, column 36:
    PL/SQL: ORA-00984: column not allowed here
    ORA-06550: line 10, column 5:
    PL/SQL: SQL Statement ignored
    SQL>
    SQL> --
    SQL> declare
      2    n_tmp   tbl.x%type;
      3  begin
      4    select x into n_tmp from tbl;
      5  exception
      6    when others then
      7      -- the line below works in 9i
      8      -- dbms_output.put_line('Sqlerrm: '||sqlerrm);
      9      -- the insert statement works in 9iR2 but the error message is
    10      -- not the one sought, how about 10g ?
    11      insert into err(a,b) values (1,sys.standard.sqlerrm);
    12      commit;
    13  end;
    14  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from err;
             A B
             1 ORA-0000: normal, successful completion
    SQL>
    SQL>The behavior of the second pl/sql block was mentioned by Nicolas:
    Re: INSERT INTO ..VALUES (SQLERRM, SQLCODE, SYSDATE) doesn't work?
    Is there any change in 10g ?
    Thanks in advance,
    pratz
    (Sorry, the hyperlink is getting modified automatically; remove the backslash ("\") immediately before the ampersand ("&") character.)
    Message was edited by:
    pratz

    Same in 10.2.0.3.0
    SQL*Plus: Release 10.1.0.4.2 - Production on Thu Jan 24 11:55:53 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> drop table tbl;
    Table dropped.
    SQL>
    SQL> drop table err;
    Table dropped.
    SQL> 
    SQL> create table tbl (x number);
    Table created.
    SQL>
    SQL> create table err (a number, b varchar2(4000));
    Table created.
    SQL> declare 
      2  n_tmp   tbl.x%type;
      3  begin  select x into n_tmp from tbl;
      4  exception  when others then  
      5  -- the line below works in 9i    
      6  --dbms_output.put_line('Sqlerrm: '||sqlerrm);   
      7  -- but the insert statement doesn't work in 9i, how about 10g ?   
      8  insert into err(a,b) values (1,sqlerrm);   
      9  commit;
    10  end;
    11  /
    insert into err(a,b) values (1,sqlerrm);
    ERROR at line 8:
    ORA-06550: line 8, column 32:
    PL/SQL: ORA-00984: column not allowed here
    ORA-06550: line 8, column 1:
    PL/SQL: SQL Statement ignored
    SQL>  declare 
      2   n_tmp   tbl.x%type;
      3   begin 
      4   select x into n_tmp from tbl;
      5   exception  when others then   
      6   -- the line below works in 9i    
      7   --dbms_output.put_line('Sqlerrm: '||sqlerrm);   
      8   -- the insert statement works in 9iR2 but the error message is    -- not the one sought, how a
    bout 10g ?    i
      9   insert into err(a,b) values (1,sys.standard.sqlerrm);   
    10   commit;
    11   end;
    12   /
    PL/SQL procedure successfully completed.
    SQL> select * from err;
             A
    B
             1
    ORA-0000: normal, successful completion
    SQL>

  • Extract statement and insert statement

    can anyone explain me the use of this insert statement and extract statement.
    INSERT lfa1-name1 INTO fg01
    extract fg01.
    thanks
    phyrose

    Hi,
           From f1 help....
    EXTRACT
    Basic form
    EXTRACT fg.
    Effect
    Writes all fields of the field group fg (FIELD-GROUPS) as an entry in asequential dataset. If you have defined a field group HEADER,its fields precede each entry as a sort key. Afterwards, you canuse SORT and LOOP ... ENDLOOP to sort or process the datasetrespectively. No further EXTRACT statements are possible afterthis.
    Notes
    General:
    As soon as you have extracted a dataset using EXTRACT, you canno longer extend the field group using INSERT. In particular, you cannot change the HEADERfield group at all after the first EXTRACT (regardless of thefield group to which it applied).
    Large extract datasets are not stored in main memory. Instead, theyare kept in an external auxiliary file. You can set the directory inwhich this file is created using the SAP profile parameterDIR_EXTRACT. The default directory is the SAP data directory(SAP profile parameter DIR_DATA).
    Notes
    Runtime errors:
    EXTRACT_AFTER_SORT/LOOP: EXTRACT after SORT, orLOOP. EXTRACT_BUFFER_NO_ROLL: Unable to create the required main
    EXTRACT_FIELD_TOO_LARGE: Occupied length of a field is toolarge.
    EXTRACT_HEADER_NOT_UNIQUE: Field group HEADER wasmodified after an EXTRACT statement.
    EXTRACT_OPEN_EXTRACTFILE_OPEN:
    Error opening the external extract dataset file.
    EXTRACT_RESOURCEHANDLER_FAILED: Error deleting the externalextract dataset file.
    EXTRACT_TOO_LARGE: Total length of the entry for extraction(including HEADER fields) is too large.
    Additional help
    Filling anExtract with Data
    Extracts
    Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures. Instead, you can use extract datasets for this purpose.
    An extract is a sequential dataset in the memory area of the program. You can only address the entries in the dataset within a special loop. The index or key access permitted with internal tables is not allowed. You may only create one extract in any ABAP program. The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem.
    An extract dataset consists of a sequence of records of a pre-defined structure. However, the structure need not be identical for all records. In one extract dataset, you can store records of different length and structure one after the other. You need not create an individual dataset for each different structure you want to store. This fact reduces the maintenance effort considerably.
    In contrast to internal tables, the system partly compresses extract datasets when storing them. This reduces the storage space required. In addition, you need not specify the structure of an extract dataset at the beginning of the program, but you can determine it dynamically during the flow of the program.
    You can use control level processing with extracts just as you can with internal tables. The internal administration for extract datasets is optimized so that it is quicker to use an extract for control level processing than an internal table.
    Procedure for creating an extract:
    Define the record types that you want to use in your extract by declaring them as field groups. The structure is defined by including fields in each field group.
    Defining an Extract
    Fill the extract line by line by extracting the required data.
    Filling an Extract with Data
    Once you have filled the extract, you can sort it and process it in a loop. At this stage, you can no longer change the contents of the extract.
    Processing Extracts
    INSERT Statement
    The INSERT statement is used to insert values into a single database table.
    <insert statement> ::= INSERT INTO <table name> <insert column list> <insert source>.
    <insert source> ::= VALUES '(' <value> ( ',' <value> )* ')'
                                | <query specification>.
    <value> ::= <value expression>
                    | <dynamic parameter specification>
                    | NULL.
    <insert column list> ::= '(' <column name> ( ',' <column name> )* ')'.
    In Open SQL the <insert column list> is not optional.
    You cannot specify string literals as values for CLOB columns. Hex literals are not supported in Open SQL.
    Examples
    INSERT INTO employees (employee_id, employee_name)
                  VALUES (4711, 'John Smith')
    Inserting Values. A new row is inserted into the table employees with the values 4711 and 'John Smith' for the columns employee_id and employee_name respectively.
    INSERT INTO well_paid_employees (employee_id, salary)
                 SELECT employee_id, salary
                                FROM employees
                                WHERE salary > ?
    Inserting the Result of a Query.  The employee_idand the salaryof all employees from table employeeswith a salary exceeding a certain value are inserted into the table well_paid_employees.
    Regards

  • The product version and database version are not compatible

    The following simple program gets an exception {The product version and database version are not compatible} its very hard to proceed from here. Does anybody know what cause this?  
    Best Regards
    Jan Isacsson
    using System.Collections.ObjectModel;
    using Microsoft.MasterDataServices.Deployment;
    using Microsoft.MasterDataServices.Services.DataContracts;
    namespace MdsDeploy
        class Program
            static void Main(string[] args)
                try
                    ModelReader reader = new ModelReader();
                    Collection<Identifier> models = reader.GetModels();
                    foreach (Identifier modelId in models)
                        Console.WriteLine(modelId.Name);
                catch (System.Exception ex)
                    Console.WriteLine("Error: " + ex.Message);
                Console.ReadKey();

    Hi Jan,
    For the error "The product version and database version are not compatible", as Emma said, the version number of the Service does not match the database schema version.
    In your scenario, which version of database are you using? Please note that MDS update required after SQL 2012 SP1 installation, please refer to the links below to see the details.
    http://byobi.com/blog/2012/11/mds-update-required-after-sql-2012-sp1-installation/
    http://msdn.microsoft.com/en-IN/library/gg488708.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Issu for running insert statement in oracle procedure.

    Hi expert,
    I ran a oracle procedure with a insert statement inside as:
    insert into table1 select....
    but I got error message related to this insert statement as "SQLERRM= ORA-08103: object no longer exists"
    I ran this statement separately in toad, no error message, but no data result from this execute.
    please tell how to fix this issue.
    Many Thanks,
    Edited by: 918440 on 27-Jun-2012 8:04 AM

    Hi friend,
    my insert statement is as follows:
            INSERT INTO HIROC_RU_FACT_S   
            select   
                    pp.policy_fk,  
                    pp.transaction_log_fk,  
                    p.policy_no,  
                    p.policy_type_code,   
                    hiroc_rpt_user.hiroc_get_entity_name(pp.policy_fk,'POLHOLDER')  policy_holder,  
                    pp.risk_fk,   
                    r.risk_base_record_fk,   
                    r.entity_fk,  
                    hiroc_sel_entity_risk_name2 (pp.risk_fk,r.entity_fk)  risk_name,   
                    substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2) rating_state_code,  
                    hiroc_get_province_name(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2), 'PROVINCE_CODE', 'L') rating_state_name,  
                    hiroc_get_provicne_pol_prefix(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2),p.policy_type_code) rating_prov_pol_prefix,   
                    nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) rating_peer_group_code,  
                    hiroc_get_lookup_desc('PEER_GROUP',nvl(r.risk_cls_used_to_rate,pth.peer_groups_code),'L')  rating_peer_group_name,   
                    pth.policy_term_history_pk,   
                    pth.term_base_record_fk,   
                    to_char(pth.effective_from_date,'yyyy') term_effective_year,   
                    c.coverage_pk,   
                    c.coverage_base_record_fk,   
                    pc.coverage_code,   
                    c.product_coverage_code,   
                    pc.long_description,   
                    pp.coverage_component_code,  
                    c.effective_from_date,   
                    c.effective_to_date,  
                    cls.coverage_code coverage_class_code,   
                    cls.coverage_long_desc coverage_class_long_desc,   
                    decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null) exposure_unit, --hiroc_get_expos_units_by_cov(c.coverage_pk,pc.coverage_code,c.effective_from_date,c.effective_to_date) exposure_unit,   
                    decode(pp.coverage_component_code ,'GROSS',cls.number_of_patient_day,null) number_of_patient_day,   
                    pth.effective_from_date  term_eff_from_date,   
                    pth.effective_to_date term_eff_to_date,    
                    pp.premium_amount premium_amount,    
                    (case when (pc.coverage_code in ('CP','MC1','MC2','MC3','MC4','HR','F') or pc.coverage_code like 'ST%') and  
                                  pp.coverage_component_code != 'RISKMGMT' then     
                            (nvl(pp.premium_amount,0))  
                        else  
                            0  
                    end) primary_premium,   
                    (hiroc_get_risk_units(hiroc_get_provicne_pol_prefix(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2),p.policy_type_code)-- rating_prov_pol_prefix  
                                        ,nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) -- rating_peer_group_code  
                                        ,cls.coverage_code --coverage_class_code  
                                        ,decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null)  
                                        ,pp.premium_amount  
                                        ,(case when (pc.coverage_code in ('CP','MC1','MC2','MC3','MC4','HR','F') or pc.coverage_code like 'ST%') and  
                                                      pp.coverage_component_code != 'RISKMGMT' then     
                                                (nvl(pp.premium_amount,0))  
                                            else  
                                                0  
                                         end)  -- primary_premium  
                                        ,p.policy_type_code           
                                        ,trunc(pth.effective_to_date))) risk_units  
             from     proddw_mart.rmv_territory_makeup tm,  
                      proddw_mart.rmv_premium_class_makeup pcm,  
                      proddw_mart.rmv_product_coverage pc,  
                      proddw_mart.rmv_coverage c,  
                      proddw_mart.rmv_risk r,  
                      proddw_mart.rmv_policy_term_history pth,  
                      proddw_mart.rmv_policy p,  
                      proddw_mart.rmv_transaction_log tl,  
                      proddw_mart.rmv_policy_premium pp,  
                      (select  /* +rule */  
                               p.policy_no,  
                               p.policy_start_date,  
                               p.policy_end_date,   
                               r.risk_pk,  
                               r.risk_description,  
                               c.coverage_pk,  
                               c.parent_coverage_base_record_fk,  
                               pc.parent_product_covg_code,  
                               pc.coverage_code,  
                               pc.short_description coverage_short_desc,   
                               pc.long_description coverage_long_desc,  
                               c.exposure_unit,  
                               pc.exposure_basis_code,  
                               c.number_of_patient_day,  
                               p.policy_start_date policy_effective_date,  
                               p.policy_end_date policy_expiry_date,  
                               c.effective_from_date,  
                               c.effective_to_date,  
                               to_char(c.effective_from_date,'YYYY') class_eff_year  
                        from   proddw_mart.odwr_coverage_only      c  
                              ,proddw_mart.odwr_product_coverage   pc  
                              ,proddw_mart.odwr_risk               r  
                              ,proddw_mart.odwr_policy             p  
                        where  pc.code                 = c.product_coverage_code  
                          and  pc.parent_product_covg_code is not null                 -- coverage classes only  
                          and  r.risk_pk = c.risk_base_record_fk  
                          and  c.accounting_to_date = to_date('1/1/3000','mm/dd/yyyy') -- only open records  
                          and  c.base_record_b = 'N'  
                          and  p.base_record_b = 'N'  
                          and  p.policy_pk = r.policy_fk  
                          and  p.accounting_to_date = to_date('1/1/3000','mm/dd/yyyy')  -- only open records  
                       group by p.policy_no,  
                               p.policy_start_date,  
                               p.policy_end_date,   
                               r.risk_pk,  
                               r.risk_description,  
                               c.coverage_pk,  
                               c.parent_coverage_base_record_fk,  
                               pc.parent_product_covg_code,  
                               pc.coverage_code,  
                               pc.short_description, -- coverage_short_desc,   
                               pc.long_description, -- coverage_long_desc,  
                               c.exposure_unit,  
                               pc.exposure_basis_code,  
                               c.number_of_patient_day,  
                               p.policy_start_date, -- policy_effective_date,  
                               p.policy_end_date, -- policy_expiry_date,  
                               c.effective_from_date,  
                               c.effective_to_date,  
                               to_char(c.effective_from_date,'YYYY')-- class_eff_year  
                      ) cls  
                where    tm.risk_type_code = r.risk_type_code  
                and        tm.county_code = r.county_code_used_to_rate  
                and        tm.effective_from_date <= pp.rate_period_from_date  
                and        tm.effective_to_date   >  pp.rate_period_from_date  
                and        pcm.practice_state_code (+) = r.practice_state_code  
                and        pcm.risk_class_code (+) = r.risk_cls_used_to_rate  
                and        nvl(pcm.effective_from_date, pp.rate_period_from_date) <= pp.rate_period_from_date  
                and        nvl(pcm.effective_to_date, to_date('01/01/3000','mm/dd/yyyy')) > pp.rate_period_from_date  
                and        pc.code = c.product_coverage_code  
                and        c.base_record_b = 'N'  
                and        ( c.record_mode_code = 'OFFICIAL'  
                         and (c.closing_trans_log_fk is null or  
                              c.closing_trans_log_fk != tl.transaction_log_pk)  
                         or c.record_mode_code = 'TEMP'  
                         and c.transaction_log_fk = tl.transaction_log_pk )  
                and   c.parent_coverage_base_record_fk is null  
                and        c.effective_from_date  <  c.effective_to_date  
                and        c.effective_from_date  <= pp.rate_period_from_date  
                and        c.effective_to_date    >  pp.rate_period_from_date  
                and   c.accounting_from_date <= tl.accounting_date  
                and   c.accounting_to_date   >  tl.accounting_date  
                and        c.coverage_base_record_fk=pp.coverage_fk  
                and        r.base_record_b = 'N'  
                and        ( r.record_mode_code = 'OFFICIAL'  
                        and (r.closing_trans_log_fk is null or  
                             r.closing_trans_log_fk != tl.transaction_log_pk)  
                        or r.record_mode_code = 'TEMP'  
                        and r.transaction_log_fk = tl.transaction_log_pk )  
                and        r.effective_from_date  <  r.effective_to_date  
                and        r.effective_from_date  <= pp.rate_period_from_date  
                and        r.effective_to_date    >  pp.rate_period_from_date  
                and   r.accounting_from_date <= tl.accounting_date  
                and   r.accounting_to_date   >  tl.accounting_date  
                and         r.risk_base_record_fk = pp.risk_fk  
                and        pth.base_record_b = 'N'  
                and        ( pth.record_mode_code = 'OFFICIAL'  
                        and (pth.closing_trans_log_fk is null or  
                             pth.closing_trans_log_fk != tl.transaction_log_pk)  
                        or pth.record_mode_code = 'TEMP'  
                        and pth.transaction_log_fk = tl.transaction_log_pk )  
                and        pth.accounting_from_date <= tl.accounting_date  
                and        pth.accounting_to_date   >  tl.accounting_date  
                and        pth.term_base_record_fk = pp.policy_term_fk  
                and   p.policy_pk = pp.policy_fk  
                and        tl.transaction_log_pk  =  pp.transaction_log_fk  
                and   pp.active_premium_b = 'Y'  
                and        pp.rate_period_type_code in ('CS_PERIOD','SR_PERIOD')  
                and        pp.rate_period_to_date > pp.rate_period_from_date  
                and tl.accounting_date <= sysdate   
                and p.policy_cycle_code = 'POLICY'  
                and substr(p.policy_no,1,1) <> 'Q'  
                and tl.transaction_log_pk = (select max(pp.transaction_log_fk)  
                                               from proddw_mart.rmv_policy_premium pp,proddw_mart.rmv_transaction_log tl2  
                                              where pth.term_base_record_fk = pp.policy_term_fk  
                                                and pp.transaction_log_fk = tl2.transaction_log_pk  
                                                and tl2.accounting_date <= sysdate )    
                 and p.policy_type_code in ('LIABCRIME','MIDWIFE')    
                 and pth.accounting_to_date =  to_date('01/01/3000','mm/dd/yyyy') --<<<*******  eliminates duplicates  
                 and p.policy_no = cls.policy_no  
            --     and r.risk_pk = cls.risk_pk  
                 and c.coverage_base_record_fk = cls.parent_coverage_base_record_fk(+)  
                 and  cls.effective_from_date < pth.effective_to_date -- from date less than period end date  
                 and  cls.effective_to_date   > pth.effective_from_date -- to date greater than period start date  
                 and  cls.policy_effective_date   < pth.effective_to_date -- from date less than period end date  
                 and  cls.policy_expiry_date     > pth.effective_from_date -- to date greater than period start date  
           group by pp.policy_fk,  
                    pp.transaction_log_fk,  
                    p.policy_no,  
                    p.policy_type_code,   
                    pp.risk_fk,   
                    r.risk_base_record_fk,   
                    r.entity_fk,  
                    substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2), -- rating_state_code,  
                    r.county_code_used_to_rate,  
                    pth.issue_state_code,  
                    nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) , --  rating_peer_group_code,  
                    r.risk_cls_used_to_rate,  
                    pth.peer_groups_code,  
                    pth.policy_term_history_pk,   
                    pth.term_base_record_fk,   
                    to_char(pth.effective_from_date,'yyyy'), --term_effective_year,   
                    c.coverage_pk,   
                    c.coverage_base_record_fk,   
                    pc.coverage_code,   
                    c.product_coverage_code,   
                    pc.long_description,   
                    pp.coverage_component_code,  
                    c.effective_from_date,   
                    c.effective_to_date,  
                    cls.coverage_code, -- coverage_class_code,   
                    cls.coverage_long_desc, -- coverage_class_long_desc,   
                    decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null),-- exposure_unit,   
                    decode(pp.coverage_component_code ,'GROSS',cls.number_of_patient_day,null), -- number_of_patient_day,   
                    pth.effective_from_date, --term_eff_from_date,   
                    pth.effective_to_date, --, --term_eff_to_date,    
                    pp.premium_amount ;Edited by: BluShadow on 27-Jun-2012 16:12
    added {noformat}{noformat} tags for readability.  PLEASE READ {message:id=9360002} AS PREVIOUSLY REQUESTED!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           &

  • Which Versions of VS Does Each Version of the SDK Work With?

    The PAM only talks about the versions of the .NET Framework - not the versions of VS.  And there basically is no Developer Guide since sometime in early BI 4.0 that might have this info.
    I have a client who is having issues with their BI 4.0 SP6 code after migrating from VS 2010 to VS 2013.  Based on conversations around which versions of Crystal for VS will work in which versions of VS, I'm almost certain that this version of the SDK is not supported in VS 2013.  But I'd like to have "official" documentation to show them and a URL I can point them to where they can get this information as new versions of VS come out.
    Thanks!
    -Dell

    Hi Dell
    I can always count on you asking DE greatest of questions
    The "party line" is; it is not the app you will be working in that is supported or not, it is the framework. Thus that BI 4.0 SDK for .NET will work in Delphi, or VS 2013 as long as these support the framework BI 4.0 works with (e.g.; 3.5 and 4.0). Now. Since the BI 4.x SDK is only to be used in managed applications, there is no craxddrt.dll version 14.x installed and thus no CR designer in the .NET IDE. I have never seen this documented in an official type of doc. However the BI 4.0 PAM says:
    Contrast this with 'SAP Crystal Reports, Developer Version for Visual Studio .NET". As the install of this product does incorporate the craxddrt.dll into VS to give us the CR designer in the .NET IDE, there is a dependency on the correct version of VS (e.g.; SP 10 for VS 2013, SP 4(?) for VS 2012).
    I suppose all of this boils down to; yes, migrating BI 4.0 SP6 code from VS 2010 to VS 2013 should work.
    - Ludek

  • Insert statement taking too long

    Hi,
    I am inserting in a TAB_A from TAB_B using following statement
    INSERT INTO TAB_A
    SELECT * FROM TAB_B;
    In TAB_A more than 98000000 rows exits. While in TAB_B rows may be vary from 1000 to 1000000.
    TAB_A is a partition table.
    This insert is taking more than 3 hrs to insert 800000 rows from TAB_B.
    I need to improve performance of this insert statement.
    Can you please help me ???

    Hi,
    Try this:
    INSERT INTO tab_a SELECT /*+append*/  * FROM tab_b;                                                                                                                                                                                           

Maybe you are looking for

  • How to remove/reimport existing   BAPI's from model

    Hi I have 2 questions 1. How to remove safely a BAPI from a model without any inconsistencies. 2.My BAPI has changed in the R/3. So in order to incorporate latest changes what should a do ( ? a Reimport of the same BAPI) ? Please help Thanks in Advan

  • ITunes and Vista Windows on new computer

    I just bought a new computer which has Vista installed - my old computer (Windows XP) had my ITunes on it. I have been trying to install ITunes on this Vista (Home Premium) computer and it will not install, I get this message when I try to install it

  • Opening and browsing Mail takes forever (memory overloaded) ?

    Since I have moved to Maverick, Mail is taking times for opening and when using. Memory is overloaded and Mail "do not answer" any more for a while ... Could you help me ?

  • Pricing Condition - Skip Access Sequence

    I have a pricing condition that is assigned an access sequence but for certain business areas, we want to skip over the access sequence and use a value from a custom table.  Is there a way to do this with a pricing requirement on the condition in the

  • IPad.  How do I change my icloud password for my new iPad?

    How do I change my icloud password for my new i?  I have a new ipad and the account has an 8- character p/w and I only recorded 7 characters, so the present one must be wrong.  I'm scared to overwrite the dots for fear I will loose it completely!