Need to extract data from the last current period of actuals

Hi, we need fill a projected account using the last current month and year of actual expenditures in the rules.
Example: S #Fcst.A #101.Y #2011.P #Mar = S #Actual.A #102.Y # (most cuurent year system). P # (more recent period of system).

Does anyone know if this is possible? We are on HFM 4.0.1

Thanks in advance!

Rick

Published by: user4631789 on February 10, 2010 13:48

You can use vba, Month (Now (), and Year (Now ()) to get 3 and 2010 respectively.

Tags: Business Intelligence

Similar Questions

  • Extract data from the table on hourly basis

    Hello

    I have a table that has two columns date all the hours of the base and the response time. I want to extract data from the date corresponding previous hourly basis with the response time. The data will be loaded into the table every midnight.

    for example: today date 23/10/2012
    I want to extract data from 22/10/12 00 to the 22/10/12 23

    The sub query pulls the date as demanded, but I'm not able to take the time to answer.

    with one also
    (select min (trunc (lhour)) as mindate, max (trunc (lhour)) as AVG_HR maxdate)
    SELECT to_char (maxdate + (level/25), "dd/mm/yyyy hh24") as a LEVEL CONNECTION dates < = * (1) 24;

    Please help me on this.

    Try this

    SELECT * FROM table_nm
     WHERE to_char(hour,'DD') = to_char(SYSDATE-1,'DD')
    
  • extract data from the generic cursor xy graph

    Hi, I'm new in this Forum.

    In my VI I need to extract the data from the graph xy of one cursor to another, how can I do this?

    I want to extract all the data between the two sliders, to develop.

    Thank you

    In addition to everything said altenbach, you want the slider list: property of the Index. That will tell you where in the table of data, the sliders are.

    The attached VI shows how we can work and also meaningless how it can be with common types of XY data.

    Lynn

  • Need to retrieve data from the internal 512 GB sata drive (now removed the MB).

    MUSIC have a 512 GB mb pro with internal chips removed sata disk. I need to get information from the drive (now removed the MB). I expect to get the data via the USB port.  How to do this and with what cable. I have a MB air as replacement.

    Thanks for your help.

    Use this external case: http://eshop.macsales.com/item/OWC/MSTG800U3K/.  I replace in clone disks, data readers, testdrives for new OSXes, etc.  Any 2.5-inch drive, really.

  • Series read returns the string with excess-need information to extract data from the middle of the string

    I read data from a STI flow meter using the base series writing and reading which used the VISA.  The read string begins with 'OK' or an error code, then a carriage return, then the data follows streaming rate temp pressure flow rate comma comma comma comma Temp... and so on. The string ends with a CR LF.  I need to pull the flow, temperature and pressure data out of the string and write it to a file.  I have difficulties to find a function that will retrieve the data for the string.  Any suggestions?  Thank you.

    Try the subset of string in the palette of the chain.

    Or match the model if you want a more direct control.

    Also a good way is the string analysis, but you must be willing to read oexactly, what happens or an error, pass the entrance.

  • extracting data from the CLOB using materialized views

    Hello

    We have xml data from clob which I have a requirement to extract (~ 50 attributes) on a daily basis, so we decided to use materialized views with refreshes full (open good suggestions)

    A small snippet of code

    CREATE THE MWMRPT MATERIALIZED VIEW. TASK_INBOUND

    IMMEDIATE CONSTRUCTION

    FULL REFRESH ON DEMAND

    WITH ROWID

    AS

    SELECT M.TASK_ID, M.BO_STATUS_CD, b.*

    OF CISADM. M1_TASK m,

    XMLTABLE (' / a ' XMLPARSE PASSING ())

    CONTENT '< a > | M.BO_DATA_AREA | "< /a >."

    ) COLUMNS

    serviceDeliverySiteId varchar2 (15) PATH

    "cmPCGeneralInfo/serviceDeliverySiteId"

    serviceSequenceId varchar2 (3) PATH "cmPCGeneralInfo/serviceSequenceId"

    completedByAssignmentId varchar2 (50) PATH "completedByAssignmentId."

    Cust_id varchar2 (10) PATH "cmPCCustomerInformation/customerId,"

    ACCT_SEQ varchar2 (5) PATH "customerInformation/accountId"

    AGRMT_SEQ varchar2 (5) PATH cmPCCustomerAgreement/agreementId"."

    COLL_SEQ varchar2 (5) PATH "cmPCGeneralInfo/accountCollectionSeq"

    REVENUE_CLASS varchar2 (10) PATH "cmPCCustomerAgreement/revenueClassCode"

    REQUESTED_BY varchar2 (50) PATH ' attributes customerInformation/contactName',...~50

    This ddl ran > 20 hours and no materialized view created. There are certain limits that we have

    • Cannot create a materialized view log
    • cannot change the source as its defined provider table
    • cannot do an ETL

    DB is 11g R2

    Any ideas/suggestions are very much appreciated

    I explored a similar approach, using the following test case.

    It creates a table "MASTER_TABLE" containing 20,000 lines and a CLOB containing an XML fragment like this:

    09HOLVUF3T6VX5QUN8UBV9BRW3FHRB9JFO4TSV79R6J87QWVGN

    UUL47WDW6C63YIIBOP1X4FEEJ2Z7NCR9BDFHGSLA5YZ5SAH8Y8

    O1BU1EXLBU945HQLLFB3LUO03XPWMHBN8Y7SO8YRCQXRSWKKL4

    ...

    1HT88050QIGOPGUHGS9RKK54YP7W6OOI6NXVM107GM47R5LUNC

    9FJ1JZ615EOUIX6EKBIVOWFDYCPQZM2HBQQ8HDP3ABVJ5N1OJA

    then an intermediate table "MASTER_TABLE_XML" with the same columns with the exception of the CLOB which turns into XMLType and finally a MVIEW:

    SQL > create table master_table like

    2. Select level as id

    3, cast ('ROW' | to_char (Level) as varchar2 (30)) as the name

    4       , (

    5. Select xmlserialize (content

    XMLAGG 6)

    7 xmlelement (evalname ('ThisIsElement' | to_char (Level)), dbms_random.string ('X', 50))

    8                    )

    9 as clob dash

    10                  )

    11 double

    12 connect by level<=>

    (13) as xmlcontent

    14 double

    15 connect by level<= 20000="">

    Table created.

    SQL > call dbms_stats.gather_table_stats (user, 'MASTER_TABLE');

    Calls made.

    SQL > create table (master_table_xml)

    Identification number 2

    3, name varchar2 (30)

    4, xmlcontent xmltype

    5)

    binary xmltype 6 securefile XML column xmlcontent store

    7;

    Table created.

    SQL > create materialized view master_table_mv

    2 build postponed

    full 3 Refresh on demand

    4, as

    5. Select t.id

    6, t.nom

    7       , x.*

    master_table_xml 8 t

    9, xmltable ('/ r' in passing t.xmlcontent)

    10 columns

    11 path of varchar2 (50) ThisIsElement1 'ThisIsElement1 '.

    12, path of varchar2 (50) ThisIsElement2 'ThisIsElement2 '.

    13, path of varchar2 (50) ThisIsElement3 'ThisIsElement3 '.

    14, path of varchar2 (50) ThisIsElement4 'ThisIsElement4 '.

    15 road of varchar2 (50) ThisIsElement5 'ThisIsElement5 '.

    16, road of varchar2 (50) ThisIsElement6 'ThisIsElement6 '.

    17 road of varchar2 (50) ThisIsElement7 'ThisIsElement7 '.

    18 road of varchar2 (50) ThisIsElement8 'ThisIsElement8 '.

    19 road to varchar2 (50) ThisIsElement9 'ThisIsElement9 '.

    20, path of varchar2 (50) ThisIsElement10 'ThisIsElement10 '.

    21, road to varchar2 (50) ThisIsElement11 'ThisIsElement11 '.

    22 road of varchar2 (50) ThisIsElement12 'ThisIsElement12 '.

    23 road of varchar2 (50) ThisIsElement13 'ThisIsElement13 '.

    24, path of varchar2 (50) ThisIsElement14 'ThisIsElement14 '.

    25 road of varchar2 (50) ThisIsElement15 'ThisIsElement15 '.

    26, path of varchar2 (50) ThisIsElement16 'ThisIsElement16 '.

    27, way to varchar2 (50) ThisIsElement17 'ThisIsElement17 '.

    28 road of varchar2 (50) ThisIsElement18 'ThisIsElement18 '.

    29 road of varchar2 (50) ThisIsElement19 'ThisIsElement19 '.

    30, path of varchar2 (50) ThisIsElement20 'ThisIsElement20 '.

    31, path of varchar2 (50) ThisIsElement21 'ThisIsElement21 '.

    32 road of varchar2 (50) ThisIsElement22 'ThisIsElement22 '.

    33, path of varchar2 (50) ThisIsElement23 'ThisIsElement23 '.

    34 road of varchar2 (50) ThisIsElement24 'ThisIsElement24 '.

    35 road of varchar2 (50) ThisIsElement25 'ThisIsElement25 '.

    36, road to varchar2 (50) ThisIsElement26 'ThisIsElement26 '.

    37, path of varchar2 (50) ThisIsElement27 'ThisIsElement27 '.

    38, path of varchar2 (50) ThisIsElement28 'ThisIsElement28 '.

    39, path of varchar2 (50) ThisIsElement29 'ThisIsElement29 '.

    40, road of varchar2 (50) ThisIsElement30 'ThisIsElement30 '.

    41 road of varchar2 (50) ThisIsElement31 'ThisIsElement31 '.

    42, path of varchar2 (50) ThisIsElement32 'ThisIsElement32 '.

    43, road to varchar2 (50) ThisIsElement33 'ThisIsElement33 '.

    44, path of varchar2 (50) ThisIsElement34 'ThisIsElement34 '.

    45, path of varchar2 (50) ThisIsElement35 'ThisIsElement35 '.

    46, path of varchar2 (50) ThisIsElement36 'ThisIsElement36 '.

    47, path of varchar2 (50) ThisIsElement37 'ThisIsElement37 '.

    48, path of varchar2 (50) ThisIsElement38 'ThisIsElement38 '.

    49, path of varchar2 (50) ThisIsElement39 'ThisIsElement39 '.

    50 road of varchar2 (50) ThisIsElement40 'ThisIsElement40 '.

    51, path of varchar2 (50) ThisIsElement41 'ThisIsElement41 '.

    52, path of varchar2 (50) ThisIsElement42 'ThisIsElement42 '.

    53, path of varchar2 (50) ThisIsElement43 'ThisIsElement43 '.

    54, path of varchar2 (50) ThisIsElement44 'ThisIsElement44 '.

    55 road of varchar2 (50) ThisIsElement45 'ThisIsElement45 '.

    56, path of varchar2 (50) ThisIsElement46 'ThisIsElement46 '.

    57, path of varchar2 (50) ThisIsElement47 'ThisIsElement47 '.

    58 road of varchar2 (50) ThisIsElement48 'ThisIsElement48 '.

    59 road of varchar2 (50) ThisIsElement49 'ThisIsElement49 '.

    60 road of varchar2 (50) ThisIsElement50 'ThisIsElement50 '.

    (61) x;

    Materialized view created.

    The discount is then performed in two steps:

    1. INSERT INTO master_table_xml
    2. Refresh the MVIEW

    (Note: as we insert in an XMLType column, we need an XML (only root) document this time)

    SQL > set timing on

    SQL >

    SQL > truncate table master_table_xml;

    Table truncated.

    Elapsed time: 00:00:00.27

    SQL >

    SQL > insert into master_table_xml

    2. select id

    3, name

    4, xmlparse (document '' |) XmlContent |'')

    5 master_table;

    20000 rows created.

    Elapsed time: 00:04:38.72

    SQL >

    SQL > call dbms_mview.refresh ('MASTER_TABLE_MV');

    Calls made.

    Elapsed time: 00:00:22.42

    SQL >

    SQL > select count (*) in the master_table_mv;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:01.38

    SQL > truncate table master_table_xml;

    Table truncated.

    Elapsed time: 00:00:00.41

  • How to extract data from the APEX report with stored procedure?

    Hi all

    I am doing a report at the APEX. the user selects two dates and click on the GO button - I have a stored procedure linked to this region of outcome for the stored procedure is called.

    my stored procedure does the following-

    using dates specified (IN) I do question and put data in a table (this painting was created only for this report).

    I want to show all the data that I entered in the table on my APEX report the same procedure call. can I use Ref cursor return? How to do this?

    Currently, I use another button in the APEX that basically retrieves all the data from table. Basically, the user clicks a button to generate the report and then another button for the report. which is not desirable at all :(


    I m using APEX 3.1.2.00.02 and Oracle 10 database.

    pls let me know if you need more clarification of the problem. Thanks in advance.

    Kind regards

    Probashi

    Published by: porobashi on May 19, 2009 14:53

    APEX to base a report out of a function that returns the sql code... Your current code goes against a Ref cursor returns the values...

    See this thread regarding taking a ref cursor and wrapping it in a function to channel out as a 'table' (use a cast to cast tabular function vale)...

    (VERY COOL STUFF HERE!)

    Re: Tyring to dynamically create the SQL statement for a calendar of SQL

    Thank you

    Tony Miller
    Webster, TX

  • problem to extract data from the database using UTL_FILE

    Dear members

    I make use of series for the SUBSTR and INSTR function to extract the fields of a data file and carve out spaces based on the number of post mentioned in the Excel worksheet. I was able to extract the first 3 areas namely, customer, manufacturer, product, but for quantity, requested delivery date, price, I can't do it.

    the flat file structure is as follows:
    Field                       Position From     Position To
    CUSTOMER_NAME               1     30
    MANUFACTURER              31     70
    PRODUCT_NAME              71     90
    QUANTITY                        91     95
    REQUESTED_SHIP_DATE    96     115
    REQUESTED_PRICE            116     120
    Sample data in the flat file is as follows:
    BESTBUY                       SONY ERICSSON                           W580i               25   1-AUG-2008          50
    BESTBUY                       SAMSUNG                                 BLACKJACK           50   15-JUL-2008         150
    BESTBUY                       APPLE                                   IPHONE 4GB          50   15-JUL-2008         
    BESTBUY                       ATT                                     TILT                100  15-JUN-2008         
    BESTBUY                       NOKIA                                   N73                 50   15-JUL-2008         200
    My program code is the following:

    CREATE OR REPLACE PROCEDURE ANVESH.PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2) 
    IS
        v_file_type utl_file.file_type;
        v_buffer VARCHAR2(1000);
        V_CUSTOMER_NAME VARCHAR2(100);
        V_MANUFACTURER VARCHAR2(50);
        V_PRODUCT_NAME VARCHAR2(50);
        V_QUANTITY NUMBER(10);
        V_REQ_SHIP_DATE DATE;
        V_REQ_PRICE NUMBER(10);
        V_LOG_FILE utl_file.file_type;
        
        V_COUNT_CUST NUMBER;
        V_COUNT_PROD NUMBER;
        
        v_start_pos number := 1;
        v_end_pos number;
       
    BEGIN
        DBMS_OUTPUT.PUT_LINE('Inside begin 1');
        v_file_type := UTL_FILE.fopen(FILE_PATH, FILE_NAME, 'r',null);
            DBMS_OUTPUT.PUT_LINE('Inside begin 1.1');
    
        
        LOOP
        
            BEGIN
                    DBMS_OUTPUT.PUT_LINE('Inside begin 2');
    
            
                UTL_FILE.GET_LINE (v_file_type,v_buffer); 
                    DBMS_OUTPUT.PUT_LINE('Inside begin 2.1');
                    
                           select instr('v_buffer',' ', 1, 1) - 1
                            --into v_end_pos
                            from dual;
    
                   
                            select substr('v_buffer', 1, 7)
                            --into V_CUSTOMER_NAME
                            from dual;
    
                            select instr('v_buffer', ' ', 31, 2)-1
                            --into v_end_pos
                            from dual;
    
                            select trim(substr('v_buffer', 28, 43))
                            --into V_MANUFACTURER
                            from dual;
    
                            select instr('v_buffer', ' ', 45, 1) - 1
                            --into v_end_pos
                            from dual;
    
                            select trim(substr('v_buffer', 44, 45))
                            --into V_PRODUCT_NAME
                            from dual;
    
                
                V_LOG_FILE := UTL_FILE.FOPEN(FILE_PATH, 'LOG_FILE.dat', 'A');
                
                    IF (V_QUANTITY > 0)
                    THEN
                       SELECT COUNT (*)
                       INTO V_COUNT_CUST
                       FROM CONVERSION_CUSTOMERS
                       WHERE CUSTOMER_NAME = V_CUSTOMER_NAME;
               
                       IF(V_COUNT_CUST > 0)
                       THEN
                           SELECT COUNT(*)
                           INTO V_COUNT_PROD
                           FROM conversion_products
                           WHERE PRODUCT_NAME = V_PRODUCT_NAME;
                  
                          IF(V_COUNT_PROD >0)
                           THEN
                                INSERT INTO XXCTS_ORDER_DETAILS_STG VALUES (V_CUSTOMER_NAME, V_PRODUCT_NAME, V_MANUFACTURER, V_QUANTITY, V_REQ_SHIP_DATE, V_REQ_PRICE, 'ACTIVE', 'ORDER TAKEN');   
            
                           ELSE
                                DBMS_OUTPUT.PUT_LINE('PRODUCT SHOULD BE VALID');
                                UTL_FILE.PUT_LINE(V_LOG_FILE, 'PRODUCT SHOULD BE VALID');                    
            
                           END IF; 
                       ELSE
                          DBMS_OUTPUT.PUT_LINE('CUSTOMER SHOULD BE VALID');
                          UTL_FILE.PUT_LINE(V_LOG_FILE, 'CUSTOMER SHOULD BE VALID');
                       END IF;       
               
            
                    ELSE
                        DBMS_OUTPUT.PUT_LINE('QUANTITY SHOULD BE VALID');
                        UTL_FILE.PUT_LINE(V_LOG_FILE, 'QUANTITY SHOULD BE VALID');
                    END IF; 
    
            
                    EXCEPTION
                    WHEN NO_DATA_FOUND THEN
                        EXIT;
                    END;
            
        END LOOP;
        
    END;
    
    /
    I was able to extract the first 3 fields of the file data, but when I use the same SUBSTR and INSTR functions to extract then three fields I am unable to do so (I get 5, 6 on the ground as well when I extract the 4th field). I've hardcoded the position values in these functions, such as mentioned in the structure of flat file.

    It would be great if someone can tell me how to extract the three fields in the flat file.


    Thank you
    Romaric

    Romaric,

    Why you use v_end_pos to trim spaces when you know the beginning and end of all columns positions?
    I do not see the code when you check out the values of other 3 columns (Qty, Date & price).

    You can use substr underneath rather do SELECT each time.

    V_CUSTOMER_NAME  := SUBSTR(v_buffer,1,30);
    V_MANUFACTURER    := SUBSTR(v_buffer,31,70);
    V_PRODUCT_NAME    := SUBSTR(v_buffer,71,90);
    V_QTY := SUBSTR(v_buffer,91,95);
    V_SHIP_DATE := SUBSTR(v_buffer,96,115);
    V_PRICE := SUBSTR(v_buffer,116,120);
    

    -Raj

  • Problem of extracting data from the XLIFF XML file

    Hi again,

    AS3 CS6 Flash Pro

    I have the XML loaded from a Flash panel language translation file strings in an XML variable. Works very well. Traces out - shown below.

    When I try to extract the data as XML < trans-unit >, I get an 1120: access of undefined property unit.

    function completeHandler(event:LoaderEvent):void {
        var stuff:XMLLoader = LoaderMax.getLoader(arrayXMLFiles[0]);
       var moreStuff:XML = LoaderMax.getContent(arrayXMLFiles[0]);
       ssDebug.trace(moreStuff); // this works with output shown below
       ssDebug.trace(moreStuff.xliff.file.body.trans-unit); // - error here
    }
    

    The Trace is here:

    <xliff version="1.0" lang="en" xmlns="http://www.w3.org/XML/1998/namespace">
      <file datatype="plaintext" original="CardJam.fla" source-language="EN">
        <header/>
        <body>
          <trans-unit id="001" resname="IDS_ZXP7_JAM_01">
            <source>If, while you are printing, your printer stops, ...</source>
          </trans-unit>
          <trans-unit id="002" resname="IDS_ZXP7_JAM_02">
            <source>look at the Operator Control Panel (OCP) for the fault description.</source>
          </trans-unit>
          <trans-unit id="003" resname="IDS_ZXP7_JAM_03">
            <source>If the fault is a card jam, open and close the Print Cover (or Options Cover).</source>
          </trans-unit>
          <trans-unit id="004" resname="IDS_ZXP7_JAM_04">
            <source>The printer will initialize and move the jammed card to the Reject Bin.</source>
          </trans-unit>
          <trans-unit id="005" resname="IDS_ZXP7_JAM_TITLE">
            <source>Card Jam</source>
          </trans-unit>
        </body>
      </file>
    </xliff>
    
    

    I found a code by looking at a similar problem - I do not know how to retrieve other data (as I guess) the rest of the HTML in the code. I need to find a better reference with details and examples.

    I fixed it by changing:

    ssDebug.trace(moreStuff.xliff.file.body.trans-unit); -error

    TO:

    ssDebug.trace (moreStuff.file.body ['trans-unit']); -no error

    with results expected (no error):

    If, while you are printing, your printer stops...

    get to the control panel (OCP) operator for the error description.

    If the fault is a card jam, open and close the Print cover (or cover the Options).

    The printer will initialize and move the card stuck in the compartment to reject.

    Card jam

  • I need to insert data from the parent to the child table inheritance

    Hi everyone I m using jdeveloper 12

    I have this use EDC:

    I m trying to have mini-programm in which i

    create porject, used to create and assign an employee as the project manager:

    It is therefore my phyiscal using uml data model

    cap1.PNG

    cap2.PNG

    My problem is: I need to see the values in the employee table, choose an employee id s and with the form create in this table: Project Manager: insert the employee with the s project id id

    but when I navigate to the form it is already full of I don't know why

    I did not understand your problem clearly.

    Could you please explain the problem with some screen shots and step by step flow?

    See you soon

    AJ

  • Slow down execution SQL - extracting data from the FACT Table

    taHi,

    We have a SQL that runs slowly.

    Select / * + ALL_ROWS PARALLEL (F 8) * /.

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_GRP_ID,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_BIL_UNT_ID,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_BNF_PKG_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_UNDWR_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_CAC_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_RTMS_HLTH_COV_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_ACTUR_RSRV_CATEG_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_BNF_TYP_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_GRP_BGIN_DT,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_GRP_END_DT,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_PLN_SEL_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_SBGRP_NM,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_SBGRP_TYP_CD,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_SBGRP_TYP_DESC,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_COBRA_IND,

    IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_SBGRP_POL_NBR,

    IA_OASIS_GRP_CAPTR_D.GRP_POL_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_SBSCR_ALTN_ID,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_RLNSP_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_GNDR_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_BTH_DT,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_MBR_ID,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_SBSCR_SCTR_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_SBSCR_RGN_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_SBSCR_ZIP_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_BDGT_RPT_CLS_CD,

    IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_WORK_DEPT_CD,

    IA_OASIS_MBR_CAPTR_D.BSC_DUAL_IN_HOUSE_IND,

    IA_OASIS_MBR_CAPTR_D.MEDCR_HICN_NUM,

    IA_OASIS_CLM_SPEC_D.CLM_PRI_DIAG_CD,

    IA_OASIS_CLM_SPEC_D.CLM_PRI_DIAG_BCKWD_MAP_IND,

    IA_OASIS_CLM_SPEC_D.CLM_PRI_ICD10_DIAG_CD,

    IA_OASIS_CLM_SPEC_D.ICD_CD_SET_TYP_CD,

    IA_OASIS_CLM_SPEC_D.CLM_APG_CD,

    IA_OASIS_CLM_SPEC_D.CLM_PTNT_DRG_CD,

    IA_OASIS_CLM_SPEC_D.CLM_PROC_CD,

    IA_OASIS_CLM_SPEC_D.CLM_PROC_MOD_1_CD,

    IA_OASIS_CLM_SPEC_D.CLM_PROC_MOD_2_CD,

    IA_OASIS_CLM_SPEC_D.CLM_POS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_TOS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_PGM_CD,

    IA_OASIS_CLM_SPEC_D.CLM_CLS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_ADMIT_TYP_CD,

    IA_OASIS_CLM_SPEC_D.CLM_BIL_PROV_PREF_STS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_BIL_PROV_PRTCP_STS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_ATTND_PROV_PRTCP_STS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_BIL_PROV_PLN_STS_CD,

    IA_OASIS_CLM_SPEC_D.CLM_NDC,

    IA_OASIS_CLM_SPEC_D.CLM_BRND_GNRC_CD,

    IA_OASIS_CLM_SPEC_D.CLM_ACSS_PLS_OOP_IND,

    IA_OASIS_CLM_SPEC_D.CLM_BNF_COV_CD,

    IA_OASIS_CLM_SPEC_D.CLM_TYP_OF_BIL_CD,

    IA_OASIS_CLM_SPEC_D.CLM_OOA_CD,

    IA_OASIS_CLM_SPEC_D.CLM_SANCT_LAT_CALL_IND,

    IA_OASIS_CLM_SPEC_D.CLM_SANCT_DED_PNLTY_IND,

    IA_OASIS_CLM_SPEC_D.CLM_SANCT_COPAY_IND,

    IA_OASIS_CLM_SPEC_D.CLM_SANCT_PCT_COPAY_IND,

    IA_OASIS_CLM_SPEC_D.CLM_SANCT_FLAT_DLR_COPAY_IND,

    IA_OASIS_CLM_SPEC_D.CLM_SANCT_HMO_ACCUM_COPAY_IND,

    IA_OASIS_CLM_SPEC_D.CLM_BIL_ALLOW_APPL_CD,

    IA_OASIS_CLM_SPEC_D.CLM_TMLY_FIL_APPL_CD,

    IA_OASIS_CLM_SPEC_D.CLM_TPLNT_APPL_CD,

    IA_OASIS_CLM_SPEC_D.CLM_ADJ_CD,

    IA_OASIS_CLM_SPEC_D.GRP_PRVDR_TIER_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_SS_CD_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_HMO_COV_LVL_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_FUND_POOL_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_HMO_PRDCT_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_BNF_CATEG_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_ADJ_TYP_CD,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_IPA_ACSS_PLS_IND,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_FUND_ID,

    IA_OASIS_CAPITN_CLM_D.CAPITN_CLM_FUND_DESC,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_GRP_ID,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_CLS_ID,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_CLS_DESC,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_PLN_ID,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_PLN_DESC,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_PRDCT_CATEG_CD,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_PRDCT_CATEG_DESC,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_PRDCT_ID,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_PRDCT_DESC,

    CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_MTL_LVL_CD,

    CLM_CLS_PLN_CAPTR_D.HIOS_PLN_ID,

    CLM_CLS_PLN_CAPTR_D.HIX_GRP_ID,

    OASIS_CLM_MBR_XREF. LGCY_SBSCR_ID,

    OASIS_CLM_MBR_XREF. LGCY_MBR_SFX_ID,

    OASIS_CLM_MBR_XREF. FACETS_SBSCR_ID,

    OASIS_CLM_MBR_XREF. FACETS_MBR_SFX_ID,

    OASIS_CLM_MBR_XREF. LGCY_CUST_ID,

    OASIS_CLM_MBR_XREF. LGCY_GRP_ID,

    OASIS_CLM_MBR_XREF. LGCY_BIL_UNT_ID,

    OASIS_CLM_MBR_XREF. FACETS_PRNT_GRP_ID,

    OASIS_CLM_MBR_XREF. FACETS_GRP_ID,

    OASIS_CLM_MBR_XREF. FACETS_CLS_ID,

    OASIS_CLM_MBR_XREF. FACETS_CONVER_MBR_EFF_DT,

    IA_OASIS_TOT_PROV_CUR_D.PROV_ID AS BEN_BILLING_PROV,

    IA_OASIS_TOT_PROV_CUR_D.PROV_ID AS BEN_ATTENDING_PROV,

    IA_OASIS_TOT_PROV_CUR_D.PROV_ID AS BEN_PCP_NUMBER,

    IA_OASIS_TOT_PROV_CUR_D.PROV_ID AS BEN_IPA_NUMBER,

    EDW. CLM_CAPITN_F.CLM_CAPITN_FRST_SVC_DT_SK,-CAL_DT Dimension is associated and had CAL_DT_SK column

    EDW. CLM_CAPITN_F.CLM_CAPITN_LST_PRCS_DT_SK,-CAL_DT Dimension is associated and had CAL_DT_SK column

    EDW. CLM_CAPITN_F.CLM_CAPITN_FRST_LOC_DT_SK,-CAL_DT Dimension is associated and had CAL_DT_SK column

    EDW. CLM_CAPITN_F.CLM_CAPITN_CHK_DT_SK,-CAL_DT Dimension is associated and had CAL_DT_SK column

    EDW. CLM_CAPITN_F.CLM_CAPITN_ADMIT_DT_SK,-CAL_DT Dimension is associated and had CAL_DT_SK column

    EDW. CLM_CAPITN_F.CLM_CAPITN_ICN,

    EDW. CLM_CAPITN_F.CLM_CAPITN_LN_NBR,

    EDW. CLM_CAPITN_F.CLM_CAPITN_PD_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_BIL_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_ALLOW_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_ALLOW_DY_NBR,

    EDW. CLM_CAPITN_F.CLM_CAPITN_UNT_OF_SVC_QTY,

    EDW. CLM_CAPITN_F.CLM_CAPITN_COB_SAV_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_COINS_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_RSN_CHRG_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_WTHLD_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_DED_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_SANCT_LAT_CALL_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_SANCT_DED_PNLTY_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_SANCT_COPAY_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_SANCT_PCT_COPAY_AMT,

    EDW. CLM_CAPITN_F.SANCT_FLAT_DLR_COPAY_AMT,

    EDW. CLM_CAPITN_F.SANCT_HMO_ACCUM_COPAY_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_TOT_NEGOT_RT_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_LN_NEGOT_RT_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_SEC_ALLOW_AMT,

    EDW. CLM_CAPITN_F.CLM_CAPITN_GATWY_ID,

    EDW. CLM_CAPITN_F.CLM_CAPITN_PROV_AGR_ID,

    EDW. CLM_CAPITN_F.CLM_CAPITN_F_SNPSHOT_MO_SK

    OF EDW. Partition CLM_CAPITN_F (JAN2012),

    EDW. IA_OASIS_GRP_CAPTR_D IA_OASIS_GRP_CAPTR_D,

    EDW. IA_OASIS_MBR_CAPTR_D IA_OASIS_MBR_CAPTR_D,

    EDW. IA_OASIS_CLM_SPEC_D IA_OASIS_CLM_SPEC_D,

    EDW. IA_OASIS_CAPITN_CLM_D IA_OASIS_CAPITN_CLM_D,

    EDW. CLM_CLS_PLN_CAPTR_D CLM_CLS_PLN_CAPTR_D,

    EDW. OASIS_CLM_MBR_XREF OASIS_CLM_MBR_XREF,

    EDW. IA_OASIS_TOT_PROV_CUR_D IA_OASIS_TOT_PROV_CUR_D

    WHERE

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_GRP_CAPTR_EDW_SK = IA_OASIS_GRP_CAPTR_D.GRP_CAPTR_EDW_SK (+) and

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_MBR_CAPTR_EDW_SK = IA_OASIS_MBR_CAPTR_D.MBR_CAPTR_EDW_SK and

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_CLM_SPEC_EDW_SK = IA_OASIS_CLM_SPEC_D.CLM_SPEC_EDW_SK and

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_CLM_EDW_SK = IA_OASIS_CAPITN_CLM_D.CLM_EDW_SK and

    EDW. CLM_CAPITN_F.CLM_CLS_PLN_CAPTR_EDW_SK = CLM_CLS_PLN_CAPTR_D.CLM_CLS_PLN_CAPTR_EDW_SK and

    EDW. CLM_CAPITN_F.MBR_XREF_SK = OASIS_CLM_MBR_XREF. MBR_XREF_SK (+) and

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_BIL_PROV_EDW_SK = IA_OASIS_TOT_PROV_CUR_D.PROV_EDW_SK and

    EDW. CLM_CAPITN_F.CLM_CAPITN_ATTND_PROV_EDW_SK = IA_OASIS_TOT_PROV_CUR_D.PROV_EDW_SK and

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_PCP_EDW_SK = IA_OASIS_TOT_PROV_CUR_D.PROV_EDW_SK and

    EDW. CLM_CAPITN_F.CLM_CAPITN_IA_IPA_PROV_EDW_SK = IA_OASIS_TOT_PROV_CUR_D.PROV_EDW_SK (+);

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

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    PL/SQL Release 11.2.0.4.0 - Production

    CORE Production 11.2.0.4.0

    AMT for Solaris: 11.2.0.4.0 - Production Version

    NLSRTL Version 11.2.0.4.0 - Production

    VALUE OF TYPE NAME

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

    OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES boolean FALSE

    optimizer_dynamic_sampling integer 2

    optimizer_features_enable string 11.2.0.4

    optimizer_index_caching integer 0

    OPTIMIZER_INDEX_COST_ADJ integer 100

    the string ALL_ROWS optimizer_mode

    optimizer_secure_view_merging Boolean TRUE

    optimizer_use_invisible_indexes boolean FALSE

    optimizer_use_pending_statistics boolean FALSE

    optimizer_use_sql_plan_baselines Boolean TRUE

    Please suggest how this can be optimized.

    VALUE OF TYPE NAME

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

    db_file_multiblock_read_count integer 32

    VALUE OF TYPE NAME

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

    DB_BLOCK_SIZE integer 32768

    CURSOR_SHARING EXACT string

  • Instant orphaned files - need to recover data on the basic disk

    Hello

    I'm sure this has been asked several times before, but how merge content from an instant orphan to the basic disk?

    Reading over there seem to be several different methods to do so.

    I have a virtual machine with three RDM, the virtual machine is running at the wide base VMDK disks but there is a single snapshot file associated with each base VMDK, snapshots do not appear in the Snapshot Manager.

    I tried to change the snapshot. The VMDK files and change the parent CIDs for the basic disk, but still not instant show in the Snapshot Manager.

    Is the best way to stop the virtual machine, remove the inventory and then add it to the inventory, I don't see the shots if the parent CID is correct?

    What is a better method?

    2. turn off then turn off the virtual machine (if it is not already off). Stop the current virtual machine with any Active snapshots.

    3. once the virtual machine is completely turned off, create a unique snapshot of the virtual machine and do not feed upward after this step.

    4 browse your data store for the virtual machine and look for the numbers you hard files. Instant latest should only be a few megabytes, and you want one that is just before that.

    5. go to the command line console and edit the .vmx for your virtual machine in the container for data store. Looking for a similar article to the following for each of your virtual disks.

    scsi0:0.present = "true"
    scsi0:0.fileName = "???-00002.vmdk"
    scsi0:0.deviceType = "scsi-hardDisk"

    You want to change the "scsi0:0.fileName =" section under the same file name that you found in step 4. You will need to repeat this in the file for each virtual disk on your VM.
    Save the .vmx file, overwriting the original.

    6. now, it will be a long process, if the hard files are large (more than 20 concerts) and can last several hours. During this process, you may lose connectivity to your ESX Server on the client of the infrastructure. What you need to do is run the below command from within the container to store the virtual machine data.

    vmware-cmd <your .vmx file> removesnapshots

    7. once the previous step is complete, check your VM settings in client infrastructure and check that your virtual disks are now pointing to the original hard file (does not contain de-00001 etc.). If everything was successful, you should be able to power to the top of your VM.

    8. once the virtual machine is running and check the operation, you can remove the last numbered - 0000x.vmdk that was created from your snapshot in the third stage (should only be a few megabytes). This file must have been ignored by the instant withdrawal because you have changed the .vmx file.

    Question I have is if the basic disk has been changed today I lose all changes today when merging the snapshots (which have not been written to since 18:00 yesterday)- or will be the basic disk back to 18:00 yesterday and lose all changes today?

    If you need to extract data from instant orphans, you know that you can NOT do without altering the current state
    new files from today will still be there - but they are not referenced in the MFT and other pieces are replaced by old data of the orphan snapshot
    If you must do this with a backup...

    or - possibly use a snashot of the RDM, as it is now...

    in any case – which gives good advice is almost impossible without sitting in front of the case

  • Script Insert statement to extract data from Table in Oracle 7i

    Hi all, I have an old Oracle legacy system that works for more than 15 years. Every now and then, we need to extract data from this table @ ORacle 7i to import to Oracle 10 G.

    My thoughts are to create a script to Insert statements in oracle 7 and that, to be deployed to Oracle 10 G.

    I found cela scripts in Google and don't know exactly how it works. No explanation on these scripts, would be greatly appreciated. I find that this format can help to produce a set of insert statements in this table to the last table to 10G.

    < pre >
    -Step 1: create this procedure:
    create or replace function ExtractData (v_table_name varchar2) return varchar2 as
    Boolean b_found: = false;
    v_tempa varchar2 (8000);
    v_tempb varchar2 (8000);
    v_tempc VARCHAR2 (255);
    Start
    for tab_rec in (select table_name from user_tables where table_name = upper (v_table_name))
    loop
    b_found: = true;
    v_tempa: =' select ' insert into ' | tab_rec.table_name |' (';
    for col_rec in (select * from user_tab_columns)
    where
    table_name = tab_rec.table_name
    order by
    column_id)
    loop
    If col_rec.column_id = 1 then
    v_tempa: = v_tempa | " ' || Chr (10) | " ' ;
    on the other
    v_tempa: = v_tempa |', ". Chr (10) | " ' ;
    v_tempb: = v_tempb |', ". Chr (10) | " ' ;
    end if;
    v_tempa: = v_tempa | col_rec.column_name;
    If instr(col_rec.data_type,'CHAR') > 0 then
    v_tempc: = "' |' | col_rec.column_name |'| " ' ;
    elsif instr (col_rec.data_type, 'DATE') > 0 then
    v_tempc: = "' to_date ("'| to_char('|| col_rec.column_name||',''mm/DD/YYYY HH24 '') | ") (', "' dd/mm/yyyy hh24"') "';
    on the other
    v_tempc: = col_rec.column_name;
    end if;
    v_tempb: = v_tempb | " ' || Decode('|| col_rec.column_name||',''Null'','||v_tempc||') | " ' ;
    end loop;
    v_tempa: = v_tempa |') values ('| v_tempb |'); "from ' |" tab_rec.table_name | « ; » ;
    end loop;
    If not b_found then
    v_tempa: ='-Table ' | v_table_name | 'not found ';
    on the other
    v_tempa: = v_tempa | Chr (10) | "select"-commit; "double;';
    end if;
    Return v_tempa;
    end;
    /
    display errors

    -STEP 2: run the following code to extract the data.
    Go head
    set pages 0
    game of stripes on
    fixed lines 2000
    the feeding off value
    trigger the echo
    var retline varchar2 (4000)
    coil c:\t1.sql
    Select 'set echo off' from dual;
    Select 'spool c:\recreatedata.sql' from dual;
    Select ' select "-these data was extracted on" | TO_CHAR (sysdate, "mm/dd/yyyy hh24" ") double;' double.

    -The following two lines as repeat as many times as the tables that you want to extract
    exec: retline: = ExtractData ('dept');
    print: retline;

    exec: retline: = ExtractData ('emp');
    print: retline;

    Select 'off spool' from dual;
    spool off
    @c:\t1

    -Step 3: run the updated c:\recreatedata.sql waiting for output to recreate the data.

    Source: http://www.idevelopment.info/data/Oracle/DBA_tips/PL_SQL/PLSQL_5.shtml




    < / pre >

    Hello

    Well what this script do.
    You will pass a table name as input to the function that will return varchar2 (string - insert statement). It will generate 2 t1.sql of sql script that contains the output sequence.

    Will use the first passed the user_tables scipt to check if the input table name exists and if there is the will reterive user_table_columns column names and generate the following sql script.
    Now, this t1.sql will run to generate a final sript formally orders insert that will run you on the target schema (make sure that the table exists).

    * #t1.sql*

    set echo off
    spool recreatedata.sql
    select '-- This data was extracted on '||to_char(sysdate,'mm/dd/yyyy hh24:mi') from dual;
    select 'insert into MY_OBJECT1 ('||chr(10)||'OWNER,'||chr(10)||'TOTAL) values ('||decode(OWNER,Null,'Null',''''||OWNER||'''')||','||chr(10)||''||decode(TOTAL,Null,'Null',TOTAL)||');' from MY_OBJECT1;
    select '-- commit;' from dual;
    spool off
    

    Then @t1.sql runs, and the general insert for the infeed table table.

    -- This data was extracted on 03/09/2009 23:39
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('MDSYS', 92800);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('TSMSYS', 256);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('DMSYS', 15104);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('TESTME', 128);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('PUBLIC', 2571392);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('OUTLN', 768);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('CTXSYS', 21888);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('OLAPSYS', 78336);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('KLONDIKE', 2432);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('SYSTEM', 51328);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('EXFSYS', 21504);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('DBSNMP', 4096);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('ORDSYS', 216192);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('SYSMAN', 111744);
    
    -- commit;
    

    Hope this helps
    Concerning

  • How to ETL extract data from database Oracle 11.1 using Cognos Data Manager 10.1

    Hello

    I need to run the IBM Cognos Data Manager 10.1 version ETL tool for extracting data from the Oracle11.1 database.

    My understanding is that, from the point of view of database, the best way would to have a stored procedure that will provide a reference cursor in the ETL client tool.

    However, a database procedure the ETL tool running seems not to be possible in this version of the data manager.

    If someone has done this before? What is the best way for this snippet to do?

    Thank you

    Emilija

    Annabelle says:

    My reading of original question: "What is the best way for this snippet to do?"

    Sorry - is NOT helping.

    The BEST way to extract data from a table is to use a SELECT statement.

    You said you want to do.

    So just repeat your original question instead of those that ask you to answer will not move forward us.

  • Extract data from Oracle into excel file

    Hello

    I have a requirement where in I need to extract data from Oracle into excel file and the worksheet excel name should be 'given '.
    for example. Excel 'AR Data_DDMMYY' file name and the name of the "Data" sheet excel

    I used the UTL_FILE API to extract the data delimited by tabs that you can open in excel, but it's not exactly an excel file as the name of the worksheet is the same as the name of the file.

    I tried to use utl_file.fcopy and frename.

    Is it possible to do it using PLSQL?

    Select * from version of v$.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Example Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    
    --select * from dba_directories
    
    begin
    
    
    f := utl_file.fopen(dir, file_name, 'W');
    
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    
    for i in c
    loop
    
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    
    end loop;
    utl_file.fclose(f);
    
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    
    end;
    Thank you
    Imran

    Hello

    I tried to change the .xlsx to .xls and it gives a note at the opening of the file "the file you are trying to open, abc.xls, is in a different format that it is specified by the file extension. Check that the file is not corrupted and precedes from a trusted source before you open the file. Do you want to open it now? »

    When you rename the file does not solve your problem.
    Anton Scheffer package generates a file in format xlsx Office 2010. When rename you it with the .xls extension, then Office 2010 will give you the warning that the file format does not match the extension.

    but the requirement has to generate excel 2003 file.

    The xml_spreadsheet package writes a format that was introduced with Office 2003, but you must use .xml as extension in other Office 2010 will give you the same caveat.
    To write the real xls version (binary), you can use Apache POI. You will need to import Java classes in your db and write a PL/SQL wrapper. Or you can use one of the options above, writing the output to a windows server and then use Excel to open and save in the required format.

    You must decide whether it is easier to write the binary xls format or to convince the customer to accept other formats that can be opened with Excel.

    Concerning
    Marcus

Maybe you are looking for

  • Toshiba 40L7335DG - mirroring without WiDi

    Hello: I have a TV with available WiDi 40L7335DG.The problem is that my cell phone and android not had available WiDi. There is another method for mirroring my screen on the TV with a Wi - Fi connection? Thank you

  • Hyper-V server multiple DRC

    2012R2 with a Hyper-V server. I run an application on this subject, and I need to have several DRC users to access. I understand that the feature has been removed. Or is there a better way to do this? I have to configure multiple server for each user

  • HP 6980 - Win 8 installs several printer icons in the Printers window

    My HP 6980 has worked for years with Vista.  Now that I have a new computer with Windows 8, I have multiple copies of HP 6980 icon in Printers window installation, usually labeled 'Copy 1'.  Sometimes none of the icons of the printer is "Ready", and

  • Always troubling with HTTPConnection

    Hi all I try to call a URL in my api application using HTTPConnection and Connector.open (URL) using my 9800 Simulator. I am still suffering with response code 302 or some exception(connectionclosedexception,timedoutexception) reading response code.

  • Replacement of cooling for Aurora liquid

    Hello I have an Aurora R1. Recently, the time CPU at full load are around 80 C. Used to be 60 c. The case to clean and replace the cooling paste (arctic silver 5) has not helped. My guess is so coolant has seen its best days. Can someone tell me wher