How to tune a query which contains "Bulk Collect Into" clause

I want to tune the below query:
SELECT customer_master_num,
product_nam
BULK COLLECT INTO t_cont09_rec
FROM TB_CMA009_SUPRA_RE_AGNT_CONT
WHERE re_agent_customer_master_num = p_63cust_master_num
AND customer_master_num = p_63board_master_num
AND cancellation_dt IS NULL
AND NVL (is_training_key_flg, 'N') = 'N';
This contains "Bulk Collect Into" clause.
TYPE cont09cur IS RECORD (
customer_master_num TB_CMA009_SUPRA_RE_AGNT_CONT.customer_master_num%TYPE,
product_nam TB_CMA009_SUPRA_RE_AGNT_CONT.product_nam%TYPE);
t_cont09_rec cont09_rec;
"t_cont09_rec" This is of Record Type
Please help me out how to tune this one.

[url http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]When your query takes too long ...
Also, don't get too distracted by the PL/SQL bulk collect into construction. If it takes time, then you have more than 99% chance that the time is spent in the SQL.
Regards,
Rob.

Similar Messages

  • Procedure failed while using bulk collect into clause and works with cursor

    hi all,
    I am using "BULK collect into" clause in my procedure and it is failing after 21 minutes and gives the error "end of file communication channel".
    after this error comes when i tried to connect database it is giving following error.
    ORA -01034 - Oracle not available.
    ORA- 27101 - shared memory realm does not exist.
    svr4- error :2 : No such file or directory.
    when i use cursor instead of BULK COLLECT INTO clause it is running successful.
    Following code is working with cursor.
    procedure work_kiosk_full(an_jobid in number ,ac_sqlcode out varchar2 ,ac_sqlerrm out varchar2) is
    ld_curr_time Date;
    cursor cur_work_kiosk is
    select distinct jt.jt_id AS jt_id,
    NVL ((ROUND ((jt_date_completed - jt_date_requested) * 24, 2)
    0
    ) AS actual_hrs_to_complete,
    NVL ((ROUND ((jt_date_responded - jt_date_requested) * 24, 2)
    0
    ) AS actual_hrs_to_respond,
    peo1.peo_name AS agent_name,
    peo1.peo_user_name AS asagent_soe_id,
    le.lglent_desc AS ap_system,
    ' ' AS assign_work_request_comment,
    DECODE (jt.jt_bill_id,
    138802, 'CLIENT BILLABLE',
    138803, 'CONTRACTED',
    138804, 'INTERNAL BILLABLE',
    NULL, ' '
    ) AS billable,
    bl.bldg_name_cc AS building, bl.bldg_id_ls AS building_id,
    DECODE (bl.bldg_active_cc,
    'Y', 'ACTIVE',
    'INACTIVE'
    ) AS building_status,
    DECODE (jt.jt_wrk_cause_id,
    141521, 'STANDARD WEAR AND TEAR',
    141522, 'NEGLIGENCE',
    141523, 'ACCIDENTAL',
    141524, 'MECHANICAL MALFUNCTION',
    141525, 'OVERSIGHT',
    141526, 'VANDAL',
    141527, 'STANDARD',
    141528, 'PROJECT WORK',
    6058229, 'TEST',
    NULL, ' '
    ) AS cause_type,
    ' ' AS comments, peo3.peo_name AS completed_by,
    jt.jt_requestor_email AS contact_email,
    jt.jt_requestor_name_first
    || ' '
    || jt.jt_requestor_name_last AS contact_name,
    jt.jt_requestor_phone AS contact_phone,
    cc.cstctrcd_apcode AS corp_code,
    cc.cstctrcd_code AS cost_center,
    jt.jt_date_closed AS date_closed,
    jt.jt_date_completed AS date_completed,
    jt.jt_date_requested AS date_requested,
    jt.jt_date_responded AS date_responded,
    jt.jt_date_response_ecd AS date_response_ecd,
    jt.jt_date_scheduled AS date_scheduled,
    DECODE (jt.jt_def_id,
    139949, 'WTG VENDOR RESPONSE',
    139950, 'WAITING ON PARTS',
    139951, 'LABOR AVAILABILITY',
    139952, 'DEFERRED- HI PRI WORK',
    139953, 'WTG APPROVAL',
    139954, 'FUNDING REQUIRED',
    139955, 'ACCESS DENIED',
    139956, 'WTG MATERIAL',
    NULL, ' '
    ) AS deferral_reason,
    jt.jt_description AS description,
    jt.jt_date_resched_ecd AS ecd,
    fmg.facility_manager AS facility_manager,
    fl.floors_text AS FLOOR, gl.genled_desc AS general_ledger,
    ' ' AS kiosk_date_requested, ' ' AS kiosk_dispatch_confirmed,
    ' ' AS kiosk_dispatched,
    eqp.equip_customer_code AS linked_equipment_alias,
    eqp.equip_id AS linked_equipment_id,
    eqp.equip_text AS linked_equipment_name,
    DECODE (jt_originator_type_id,
    1000, 'PROJECT MOVE REQUEST',
    138834, 'CUSTOMER INITIATED CORRECTION',
    138835, 'CUSTOMER INITIATED REQUEST',
    138836, 'CORRECTIVE MAINTENANCE',
    138837, 'CONFERENCE ROOM BOOKING',
    138838, 'PROJECT INITIATED REQUEST',
    138839, 'PLANNED PREVENTIVE MAINTENANCE',
    138840, 'SELF INITATED REQUEST',
    NULL, ' '
    ) AS originator_type,
    ' ' AS payment_terms, priority_text AS priority_code,
    swoty.sworktype_text AS problem_type,
    prop.property_name_cc AS property,
    jt.jt_cost_quote_total AS quote_total,
    par.levels_name AS region,
    DECODE (jt.jt_repdef_id,
    141534, 'ADJUSTED SETTING',
    141535, 'TRAINING FOR END',
    141536, 'NEW REQUEST',
    141537, 'NO REPAIR REQUIR',
    141538, 'REPLACED PARTS',
    141539, 'REPLACE EQUIPMEN',
    1000699, 'NEW REQUEST',
    NULL, ' '
    ) AS repair_definitions,
    jt.jt_repairdesc AS repair_description,
    jt.jt_requestor AS requestor, ' ' AS requestor_cost_center,
    jt.jt_requestor_email AS requestor_email,
    jt.jt_requestor_name_first AS requestor_name,
    jt.jt_requestor_phone AS requestor_phone,
    ' ' AS response_time, rm.room_name_cc AS room,
    p1.peo_provider_code1 AS service_provider,
    p1.peo_address_1 AS service_provider_address,
    peocity.city_text service_provider_city,
    p1.peo_provider_code1 AS service_provider_code,
    peocity.city_country_name AS service_provider_country,
    peocur.currency_text AS service_provider_currency,
    p1.peo_name AS service_provider_description,
    p1.peo_dispatch_method AS serv_prov_dispatc_hmethod,
    p1.peo_rate_double AS serv_prov_double_time_rate,
    p1.peo_email AS service_provider_email,
    p1.peo_emergency_phone AS serv_prov_emergency_phone,
    p1.peo_fax AS service_provider_fax_number,
    p1.peo_home_phone AS service_provider_home_phone,
    p1.peo_rate_hourly AS service_provider_hourly_rate,
    p1.peo_title AS service_provider_job_title,
    p1.peo_method_id AS service_provider_method,
    p1.peo_cell_phone AS service_provider_mobile_phone,
    p1.peo_pager AS service_provider_pager,
    p1.peo_rate_differential AS service_provider_rates,
    p1.peo_rate_differential AS ser_prov_shift_differential,
    peocity.city_state_prov_text AS serv_prov_state_province,
    DECODE (p1.peo_active,
    'Y', 'ACTIVE',
    'INACTIVE'
    ) AS service_provider_status,
    p1.peo_url AS serv_prov_web_site_address,
    p1.peo_phone AS service_provider_work_phone,
    p1.peo_postal_code AS serv_prov_zip_postal_code, ' ' AS shift,
    ' ' AS skill,
    DECODE (jt.jt_bigstatus_id,
    138813, 'NEW',
    138814, 'PENDING',
    138815, 'OPEN',
    138816, 'COMPLETED',
    138817, 'CLOSED',
    138818, 'CANCELLED',
    NULL, ' '
    ) AS status,
    lev.levels_name AS subregion, ' ' AS trade,
    p1.peo_ls_interface_code1 AS vendor_id,
    p1.peo_fax AS vendor_purchasing_fax,
    p1.peo_vendor_site_code AS vendor_sitecode,
    jt.jt_id AS vendor_ticket, p1.peo_name AS vendor_companyname,
    jt.jt_requestor_vip AS vip, wo.wo_id AS work_order_no,
    jt.jt_id AS work_request,
    jt.jt_class_id AS work_request_class,
    woty.worktype_text AS work_type, ' ' AS wr_cost,
    jt.jt_description AS wr_description,
    ' ' AS wr_dispatch_method,
    DECODE (jt.jt_bigstatus_id,
    138813, 'NEW',
    138814, 'PENDING',
    138815, 'OPEN',
    138816, 'COMPLETED',
    138817, 'CLOSED',
    138818, 'CANCELLED',
    NULL, ' '
    ) AS wr_status,
    ctry.country_name AS country
    FROM citi.jobticket jt,
    citi.property prop,
    citi.bldg bl,
    citi.bldg_levels bldglvl,
    citi.LEVELS lev,
    citi.LEVELS par,
    (SELECT crstools.stragg (peo_name) facility_manager,
    bldgcon_bldg_id
    FROM citi.bldg_contacts, citi.people
    WHERE bldgcon_peo_id = peo_id
    AND bldgcon_contype_id IN (40181, 10142)
    GROUP BY bldgcon_bldg_id) fmg,
    citi.floors fl,
    citi.room rm,
    citi.general_ledger gl,
    citi.legal_entity le,
    citi.cost_center_codes cc,
    citi.equipment eqp,
    citi.worktype woty,
    citi.subworktype swoty,
    citi.work_order wo,
    citi.jt_workers jtwo,
    citi.priority,
    citi.country ctry,
    citi.people p1,
    citi.people peo3,
    citi.people peo1,
    citi.city peocity,
    citi.currency peocur
    WHERE jt.jt_bldg_id = bl.bldg_id
    AND bl.bldg_id = bldglvl.bldg_levels_bldg_id
    AND bldglvl.bldg_levels_levels_id = lev.levels_id
    AND lev.levels_parent = par.levels_id(+)
    AND prop.property_id = bl.bldg_property_id
    AND bl.bldg_active_ls <> 'N'
    AND jt.jt_floors_id = fl.floors_id(+)
    AND jt.jt_room_id = rm.room_id(+)
    AND jt.jt_bldg_id = fmg.bldgcon_bldg_id(+)
    AND jt.jt_genled_id = gl.genled_id(+)
    AND gl.genled_lglent_id = le.lglent_id(+)
    AND jt.jt_cstctrcd_id = cc.cstctrcd_id(+)
    AND jt.jt_equip_id = eqp.equip_id(+)
    AND jt.jt_id = jtwo.jtw_jt_id(+)
    AND jt.jt_worktype_id = woty.worktype_id(+)
    AND jt.jt_sworktype_id = swoty.sworktype_id(+)
    AND jt.jt_wo_id = wo.wo_id
    AND jt.jt_priority_id = priority_id(+)
    --AND jt.jt_date_requested >= ADD_MONTHS (SYSDATE, -12)
    AND jt.jt_last_update >= ADD_MONTHS (ld_curr_time, -12)
    AND bl.bldg_country_id = ctry.country_id
    AND jtwo.jtw_peo_id = p1.peo_id(+)
    AND p1.peo_city_id = peocity.city_id(+)
    AND jt.jt_completed_by_peo_id = peo3.peo_id(+)
    AND p1.peo_rate_currency_id = peocur.currency_id(+)
    AND jt.jt_agent_peo_id = peo1.peo_id(+);
    BEGIN
    execute immediate 'truncate table crstools.drt_bom_work_kiosk';
    select sysdate into ld_curr_time from dual;
    FOR cur_rec in cur_work_kiosk LOOP
    IF MOD(cur_work_kiosk%rowcount,10000 ) = 0 then
    COMMIT;
    END IF;
    INSERT INTO crstools.drt_bom_work_kiosk
    ( JT_ID
    ,ACTUAL_HRS_TO_COMPLETE
    ,ACTUAL_HRS_TO_RESPOND
    ,AGENT_NAME
    ,ASAGENT_SOE_ID
    ,AP_SYSTEM
    ,ASSIGN_WORK_REQUEST_COMMENT
    ,BILLABLE
    ,BUILDING
    ,BUILDING_ID
    ,BUILDING_STATUS
    ,CAUSE_TYPE
    ,COMMENTS
    ,COMPLETED_BY
    ,CONTACT_EMAIL
    ,CONTACT_NAME
    ,CONTACT_PHONE
    ,CORP_CODE
    ,COST_CENTER
    ,DATE_CLOSED
    ,DATE_COMPLETED
    ,DATE_REQUESTED
    ,DATE_RESPONDED
    ,DATE_RESPONSE_ECD
    ,DATE_SCHEDULED
    ,DEFERRAL_REASON
    ,DESCRIPTION
    ,ECD
    ,FACILITY_MANAGER
    ,FLOOR
    ,GENERAL_LEDGER
    ,KIOSK_DATE_REQUESTED
    ,KIOSK_DISPATCH_CONFIRMED
    ,KIOSK_DISPATCHED
    ,LINKED_EQUIPMENT_ALIAS
    ,LINKED_EQUIPMENT_ID
    ,LINKED_EQUIPMENT_NAME
    ,ORIGINATOR_TYPE
    ,PAYMENT_TERMS
    ,PRIORITY_CODE
    ,PROBLEM_TYPE
    ,PROPERTY
    ,QUOTE_TOTAL
    ,REGION
    ,REPAIR_DEFINITIONS
    ,REPAIR_DESCRIPTION
    ,REQUESTOR
    ,REQUESTOR_COST_CENTER
    ,REQUESTOR_EMAIL
    ,REQUESTOR_NAME
    ,REQUESTOR_PHONE
    ,RESPONSE_TIME
    ,ROOM
    ,SERVICE_PROVIDER
    ,SERVICE_PROVIDER_ADDRESS
    ,SERVICE_PROVIDER_CITY
    ,SERVICE_PROVIDER_CODE
    ,SERVICE_PROVIDER_COUNTRY
    ,SERVICE_PROVIDER_CURRENCY
    ,SERVICE_PROVIDER_DESCRIPTION
    ,SERV_PROV_DISPATC_HMETHOD
    ,SERV_PROV_DOUBLE_TIME_RATE
    ,SERVICE_PROVIDER_EMAIL
    ,SERV_PROV_EMERGENCY_PHONE
    ,SERVICE_PROVIDER_FAX_NUMBER
    ,SERVICE_PROVIDER_HOME_PHONE
    ,SERVICE_PROVIDER_HOURLY_RATE
    ,SERVICE_PROVIDER_JOB_TITLE
    ,SERVICE_PROVIDER_METHOD
    ,SERVICE_PROVIDER_MOBILE_PHONE
    ,SERVICE_PROVIDER_PAGER
    ,SERVICE_PROVIDER_RATES
    ,SER_PROV_SHIFT_DIFFERENTIAL
    ,SERV_PROV_STATE_PROVINCE
    ,SERVICE_PROVIDER_STATUS
    ,SERV_PROV_WEB_SITE_ADDRESS
    ,SERVICE_PROVIDER_WORK_PHONE
    ,SERV_PROV_ZIP_POSTAL_CODE
    ,SHIFT
    ,SKILL
    ,STATUS
    ,SUBREGION
    ,TRADE
    ,VENDOR_ID
    ,VENDOR_PURCHASING_FAX
    ,VENDOR_SITECODE
    ,VENDOR_TICKET
    ,VENDOR_COMPANYNAME
    ,VIP
    ,WORK_ORDER_NO
    ,WORK_REQUEST
    ,WORK_REQUEST_CLASS
    ,WORK_TYPE
    ,WR_COST
    ,WR_DESCRIPTION
    ,WR_DISPATCH_METHOD
    ,WR_STATUS
    ,COUNTRY
    ,CREATE_DATE
    VALUES
    (cur_rec.jt_id
    ,cur_rec.ACTUAL_HRS_TO_COMPLETE
    ,cur_rec.ACTUAL_HRS_TO_RESPOND
    ,cur_rec.AGENT_NAME
    ,cur_rec.ASAGENT_SOE_ID
    ,cur_rec.AP_SYSTEM
    ,cur_rec.ASSIGN_WORK_REQUEST_COMMENT
    ,cur_rec.BILLABLE
    ,cur_rec.BUILDING
    ,cur_rec.BUILDING_ID
    ,cur_rec.BUILDING_STATUS
    ,cur_rec.CAUSE_TYPE
    ,cur_rec.COMMENTS
    ,cur_rec.COMPLETED_BY
    ,cur_rec.CONTACT_EMAIL
    ,cur_rec.CONTACT_NAME
    ,cur_rec.CONTACT_PHONE
    ,cur_rec.CORP_CODE
    ,cur_rec.COST_CENTER
    ,cur_rec.DATE_CLOSED
    ,cur_rec.DATE_COMPLETED
    ,cur_rec.DATE_REQUESTED
    ,cur_rec.DATE_RESPONDED
    ,cur_rec.DATE_RESPONSE_ECD
    ,cur_rec.DATE_SCHEDULED
    ,cur_rec.DEFERRAL_REASON
    ,cur_rec.DESCRIPTION
    ,cur_rec.ECD
    ,cur_rec.FACILITY_MANAGER
    ,cur_rec.FLOOR
    ,cur_rec.GENERAL_LEDGER
    ,cur_rec.KIOSK_DATE_REQUESTED
    ,cur_rec.KIOSK_DISPATCH_CONFIRMED
    ,cur_rec.KIOSK_DISPATCHED
    ,cur_rec.LINKED_EQUIPMENT_ALIAS
    ,cur_rec.LINKED_EQUIPMENT_ID
    ,cur_rec.LINKED_EQUIPMENT_NAME
    ,cur_rec.ORIGINATOR_TYPE
    ,cur_rec.PAYMENT_TERMS
    ,cur_rec.PRIORITY_CODE
    ,cur_rec.PROBLEM_TYPE
    ,cur_rec.PROPERTY
    ,cur_rec.QUOTE_TOTAL
    ,cur_rec.REGION
    ,cur_rec.REPAIR_DEFINITIONS
    ,cur_rec.REPAIR_DESCRIPTION
    ,cur_rec.REQUESTOR
    ,cur_rec.REQUESTOR_COST_CENTER
    ,cur_rec.REQUESTOR_EMAIL
    ,cur_rec.REQUESTOR_NAME
    ,cur_rec.REQUESTOR_PHONE
    ,cur_rec.RESPONSE_TIME
    ,cur_rec.ROOM
    ,cur_rec.SERVICE_PROVIDER
    ,cur_rec.SERVICE_PROVIDER_ADDRESS
    ,cur_rec.SERVICE_PROVIDER_CITY
    ,cur_rec.SERVICE_PROVIDER_CODE
    ,cur_rec.SERVICE_PROVIDER_COUNTRY
    ,cur_rec.SERVICE_PROVIDER_CURRENCY
    ,cur_rec.SERVICE_PROVIDER_DESCRIPTION
    ,cur_rec.SERV_PROV_DISPATC_HMETHOD
    ,cur_rec.SERV_PROV_DOUBLE_TIME_RATE
    ,cur_rec.SERVICE_PROVIDER_EMAIL
    ,cur_rec.SERV_PROV_EMERGENCY_PHONE
    ,cur_rec.SERVICE_PROVIDER_FAX_NUMBER
    ,cur_rec.SERVICE_PROVIDER_HOME_PHONE
    ,cur_rec.SERVICE_PROVIDER_HOURLY_RATE
    ,cur_rec.SERVICE_PROVIDER_JOB_TITLE
    ,cur_rec.SERVICE_PROVIDER_METHOD
    ,cur_rec.SERVICE_PROVIDER_MOBILE_PHONE
    ,cur_rec.SERVICE_PROVIDER_PAGER
    ,cur_rec.SERVICE_PROVIDER_RATES
    ,cur_rec.SER_PROV_SHIFT_DIFFERENTIAL
    ,cur_rec.SERV_PROV_STATE_PROVINCE
    ,cur_rec.SERVICE_PROVIDER_STATUS
    ,cur_rec.SERV_PROV_WEB_SITE_ADDRESS
    ,cur_rec.SERVICE_PROVIDER_WORK_PHONE
    ,cur_rec.SERV_PROV_ZIP_POSTAL_CODE
    ,cur_rec.SHIFT
    ,cur_rec.SKILL
    ,cur_rec.STATUS
    ,cur_rec.SUBREGION
    ,cur_rec.TRADE
    ,cur_rec.VENDOR_ID
    ,cur_rec.VENDOR_PURCHASING_FAX
    ,cur_rec.VENDOR_SITECODE
    ,cur_rec.VENDOR_TICKET
    ,cur_rec.VENDOR_COMPANYNAME
    ,cur_rec.VIP
    ,cur_rec.WORK_ORDER_NO
    ,cur_rec.WORK_REQUEST
    ,cur_rec.WORK_REQUEST_CLASS
    ,cur_rec.WORK_TYPE
    ,cur_rec.WR_COST
    ,cur_rec.WR_DESCRIPTION
    ,cur_rec.WR_DISPATCH_METHOD
    ,cur_rec.WR_STATUS
    ,cur_rec.COUNTRY
    ,ld_curr_time
    END LOOP;
    COMMIT;
    exception
    when others then
    rollback;
    dbms_output.put_line('SQLCODE :'||sqlcode ||' Error :'||sqlerrm);
    end work_kiosk_full;
    Note : total record inserted 849000.
    The same code does not work with bulk collect into caluse.
    Please help me out why this is happening.
    Thanks & regards
    shyam~

    Shyam,
    I agree with Billy.
    Why are you not using an INSERT..SELECT ?
    Also, what are you trying to achieve by
    - incremental commits?
    - copying data from one table to another (using expensive I/O)?
    - using dynamic DML?
    Most of these approaches are typically wrong - and not recommended for scalable and performant Oracle applications.I could see you using a CURSOR FOR LOOP if you were changing the data being inserted in such a way that you couldn't encapsulate the changes in a query, but you are doing a straight insert into the table from your Cursor. A much more efficient way would be to use the following modifications I made to your code example:
    PROCEDURE WORK_KIOSK_FULL(AN_JOBID   IN NUMBER,
                              AC_SQLCODE OUT VARCHAR2,
                              AC_SQLERRM OUT VARCHAR2) IS
    BEGIN
       EXECUTE IMMEDIATE 'truncate table crstools.drt_bom_work_kiosk';
       /* Note:  The APPEND hint forces a Direct Path INSERT (see Link below code sample) and is combined with the NOLOGGING Hint */
       /*        To dramtically increase performance.  The Direct Path INSERT inserts records above the High-Water Mark on the table. */
       INSERT /*+ APPEND NOLOGGING */ INTO CRSTOOLS.DRT_BOM_WORK_KIOSK
          (JT_ID
          ,ACTUAL_HRS_TO_COMPLETE
          ,ACTUAL_HRS_TO_RESPOND
          ,AGENT_NAME
          ,ASAGENT_SOE_ID
          ,AP_SYSTEM
    --      ,ASSIGN_WORK_REQUEST_COMMENT     /* I commented out this COLUMN because it doesn't make sense to me to insert */
          ,BILLABLE                          /* a couple of space characters into a table.   If the intent is to leave the column NULL */
          ,BUILDING                          /* don't include it in your INSERT statement and it will be NULL.  If there is a valid reason */
          ,BUILDING_ID                       /* for inserting the spaces, then remove the "line comments" from the insert and select statments */
          ,BUILDING_STATUS
          ,CAUSE_TYPE
    --      ,COMMENTS
          ,COMPLETED_BY
          ,CONTACT_EMAIL
          ,CONTACT_NAME
          ,CONTACT_PHONE
          ,CORP_CODE
          ,COST_CENTER
          ,DATE_CLOSED
          ,DATE_COMPLETED
          ,DATE_REQUESTED
          ,DATE_RESPONDED
          ,DATE_RESPONSE_ECD
          ,DATE_SCHEDULED
          ,DEFERRAL_REASON
          ,DESCRIPTION
          ,ECD
          ,FACILITY_MANAGER
          ,FLOOR
          ,GENERAL_LEDGER
    --      ,KIOSK_DATE_REQUESTED
    --      ,KIOSK_DISPATCH_CONFIRMED
    --      ,KIOSK_DISPATCHED
          ,LINKED_EQUIPMENT_ALIAS
          ,LINKED_EQUIPMENT_ID
          ,LINKED_EQUIPMENT_NAME
          ,ORIGINATOR_TYPE
    --      ,PAYMENT_TERMS
          ,PRIORITY_CODE
          ,PROBLEM_TYPE
          ,PROPERTY
          ,QUOTE_TOTAL
          ,REGION
          ,REPAIR_DEFINITIONS
          ,REPAIR_DESCRIPTION
          ,REQUESTOR
    --      ,REQUESTOR_COST_CENTER
          ,REQUESTOR_EMAIL
          ,REQUESTOR_NAME
          ,REQUESTOR_PHONE
    --      ,RESPONSE_TIME
          ,ROOM
          ,SERVICE_PROVIDER
          ,SERVICE_PROVIDER_ADDRESS
          ,SERVICE_PROVIDER_CITY
          ,SERVICE_PROVIDER_CODE
          ,SERVICE_PROVIDER_COUNTRY
          ,SERVICE_PROVIDER_CURRENCY
          ,SERVICE_PROVIDER_DESCRIPTION
          ,SERV_PROV_DISPATC_HMETHOD
          ,SERV_PROV_DOUBLE_TIME_RATE
          ,SERVICE_PROVIDER_EMAIL
          ,SERV_PROV_EMERGENCY_PHONE
          ,SERVICE_PROVIDER_FAX_NUMBER
          ,SERVICE_PROVIDER_HOME_PHONE
          ,SERVICE_PROVIDER_HOURLY_RATE
          ,SERVICE_PROVIDER_JOB_TITLE
          ,SERVICE_PROVIDER_METHOD
          ,SERVICE_PROVIDER_MOBILE_PHONE
          ,SERVICE_PROVIDER_PAGER
          ,SERVICE_PROVIDER_RATES
          ,SER_PROV_SHIFT_DIFFERENTIAL
          ,SERV_PROV_STATE_PROVINCE
          ,SERVICE_PROVIDER_STATUS
          ,SERV_PROV_WEB_SITE_ADDRESS
          ,SERVICE_PROVIDER_WORK_PHONE
          ,SERV_PROV_ZIP_POSTAL_CODE
    --      ,SHIFT
    --      ,SKILL
          ,STATUS
          ,SUBREGION
    --      ,TRADE
          ,VENDOR_ID
          ,VENDOR_PURCHASING_FAX
          ,VENDOR_SITECODE
          ,VENDOR_TICKET
          ,VENDOR_COMPANYNAME
          ,VIP
          ,WORK_ORDER_NO
          ,WORK_REQUEST
          ,WORK_REQUEST_CLASS
          ,WORK_TYPE
    --      ,WR_COST
          ,WR_DESCRIPTION
    --      ,WR_DISPATCH_METHOD
          ,WR_STATUS
          ,COUNTRY
          ,CREATE_DATE
       VALUES
          (SELECT DISTINCT
              JT.JT_ID AS JT_ID
             ,NVL((ROUND((JT_DATE_COMPLETED - JT_DATE_REQUESTED) * 24,2)),0) AS ACTUAL_HRS_TO_COMPLETE
             ,NVL((ROUND((JT_DATE_RESPONDED - JT_DATE_REQUESTED) * 24,2)),0) AS ACTUAL_HRS_TO_RESPOND
             ,PEO1.PEO_NAME AS AGENT_NAME
             ,PEO1.PEO_USER_NAME AS ASAGENT_SOE_ID
             ,LE.LGLENT_DESC AS AP_SYSTEM
    --         ,' ' AS ASSIGN_WORK_REQUEST_COMMENT
             ,DECODE(JT.JT_BILL_ID,138802,'CLIENT BILLABLE'
                                  ,138803,'CONTRACTED'
                                  ,138804,'INTERNAL BILLABLE',NULL,' ') AS BILLABLE
             ,BL.BLDG_NAME_CC AS BUILDING
             ,BL.BLDG_ID_LS AS BUILDING_ID
             ,DECODE(BL.BLDG_ACTIVE_CC, 'Y', 'ACTIVE', 'INACTIVE') AS BUILDING_STATUS
             ,DECODE(JT.JT_WRK_CAUSE_ID,141521,'STANDARD WEAR AND TEAR'
                                       ,141522,'NEGLIGENCE'
                                       ,141523,'ACCIDENTAL'
                                       ,141524,'MECHANICAL MALFUNCTION'
                                       ,141525,'OVERSIGHT'
                                       ,141526,'VANDAL'
                                       ,141527,'STANDARD'
                                       ,141528,'PROJECT WORK'
                                       ,6058229,'TEST',NULL,' ') AS CAUSE_TYPE
    --         ,' ' AS COMMENTS
             ,PEO3.PEO_NAME AS COMPLETED_BY
             ,JT.JT_REQUESTOR_EMAIL AS CONTACT_EMAIL
             ,JT.JT_REQUESTOR_NAME_FIRST || ' ' ||JT.JT_REQUESTOR_NAME_LAST AS CONTACT_NAME
             ,JT.JT_REQUESTOR_PHONE AS CONTACT_PHONE
             ,CC.CSTCTRCD_APCODE AS CORP_CODE
             ,CC.CSTCTRCD_CODE AS COST_CENTER
             ,JT.JT_DATE_CLOSED AS DATE_CLOSED
             ,JT.JT_DATE_COMPLETED AS DATE_COMPLETED
             ,JT.JT_DATE_REQUESTED AS DATE_REQUESTED
             ,JT.JT_DATE_RESPONDED AS DATE_RESPONDED
             ,JT.JT_DATE_RESPONSE_ECD AS DATE_RESPONSE_ECD
             ,JT.JT_DATE_SCHEDULED AS DATE_SCHEDULED
             ,DECODE(JT.JT_DEF_ID,139949,'WTG VENDOR RESPONSE'
                                 ,139950,'WAITING ON PARTS'
                                 ,139951,'LABOR AVAILABILITY'
                                 ,139952,'DEFERRED- HI PRI WORK'
                                 ,139953,'WTG APPROVAL'
                                 ,139954,'FUNDING REQUIRED'
                                 ,139955,'ACCESS DENIED'
                                 ,139956,'WTG MATERIAL',NULL,' ') AS DEFERRAL_REASON
             ,JT.JT_DESCRIPTION AS DESCRIPTION
             ,JT.JT_DATE_RESCHED_ECD AS ECD
             ,FMG.FACILITY_MANAGER AS FACILITY_MANAGER
             ,FL.FLOORS_TEXT AS FLOOR
             ,GL.GENLED_DESC AS GENERAL_LEDGER
    --         ,' ' AS KIOSK_DATE_REQUESTED
    --         ,' ' AS KIOSK_DISPATCH_CONFIRMED
    --         ,' ' AS KIOSK_DISPATCHED
             ,EQP.EQUIP_CUSTOMER_CODE AS LINKED_EQUIPMENT_ALIAS
             ,EQP.EQUIP_ID AS LINKED_EQUIPMENT_ID
             ,EQP.EQUIP_TEXT AS LINKED_EQUIPMENT_NAME
             ,DECODE(JT_ORIGINATOR_TYPE_ID,1000,'PROJECT MOVE REQUEST'
                                          ,138834,'CUSTOMER INITIATED CORRECTION'
                                          ,138835,'CUSTOMER INITIATED REQUEST'
                                          ,138836,'CORRECTIVE MAINTENANCE'
                                          ,138837,'CONFERENCE ROOM BOOKING'
                                          ,138838,'PROJECT INITIATED REQUEST'
                                          ,138839,'PLANNED PREVENTIVE MAINTENANCE'
                                          ,138840,'SELF INITATED REQUEST',NULL,' ') AS ORIGINATOR_TYPE
    --         ,' ' AS PAYMENT_TERMS
             ,PRIORITY_TEXT AS PRIORITY_CODE
             ,SWOTY.SWORKTYPE_TEXT AS PROBLEM_TYPE
             ,PROP.PROPERTY_NAME_CC AS PROPERTY
             ,JT.JT_COST_QUOTE_TOTAL AS QUOTE_TOTAL
             ,PAR.LEVELS_NAME AS REGION
             ,DECODE(JT.JT_REPDEF_ID,141534,'ADJUSTED SETTING'
                                    ,141535,'TRAINING FOR END'
                                    ,141536,'NEW REQUEST'
                                    ,141537,'NO REPAIR REQUIR'
                                    ,141538,'REPLACED PARTS'
                                    ,141539,'REPLACE EQUIPMEN'
                                    ,1000699,'NEW REQUEST',NULL,' ') AS REPAIR_DEFINITIONS
             ,JT.JT_REPAIRDESC AS REPAIR_DESCRIPTION
             ,JT.JT_REQUESTOR AS REQUESTOR
    --         ,' ' AS REQUESTOR_COST_CENTER
             ,JT.JT_REQUESTOR_EMAIL AS REQUESTOR_EMAIL
             ,JT.JT_REQUESTOR_NAME_FIRST AS REQUESTOR_NAME
             ,JT.JT_REQUESTOR_PHONE AS REQUESTOR_PHONE
    --         ,' ' AS RESPONSE_TIME
             ,RM.ROOM_NAME_CC AS ROOM
             ,P1.PEO_PROVIDER_CODE1 AS SERVICE_PROVIDER
             ,P1.PEO_ADDRESS_1 AS SERVICE_PROVIDER_ADDRESS
             ,PEOCITY.CITY_TEXT SERVICE_PROVIDER_CITY
             ,P1.PEO_PROVIDER_CODE1 AS SERVICE_PROVIDER_CODE
             ,PEOCITY.CITY_COUNTRY_NAME AS SERVICE_PROVIDER_COUNTRY
             ,PEOCUR.CURRENCY_TEXT AS SERVICE_PROVIDER_CURRENCY
             ,P1.PEO_NAME AS SERVICE_PROVIDER_DESCRIPTION
             ,P1.PEO_DISPATCH_METHOD AS SERV_PROV_DISPATC_HMETHOD
             ,P1.PEO_RATE_DOUBLE AS SERV_PROV_DOUBLE_TIME_RATE
             ,P1.PEO_EMAIL AS SERVICE_PROVIDER_EMAIL
             ,P1.PEO_EMERGENCY_PHONE AS SERV_PROV_EMERGENCY_PHONE
             ,P1.PEO_FAX AS SERVICE_PROVIDER_FAX_NUMBER
             ,P1.PEO_HOME_PHONE AS SERVICE_PROVIDER_HOME_PHONE
             ,P1.PEO_RATE_HOURLY AS SERVICE_PROVIDER_HOURLY_RATE
             ,P1.PEO_TITLE AS SERVICE_PROVIDER_JOB_TITLE
             ,P1.PEO_METHOD_ID AS SERVICE_PROVIDER_METHOD
             ,P1.PEO_CELL_PHONE AS SERVICE_PROVIDER_MOBILE_PHONE
             ,P1.PEO_PAGER AS SERVICE_PROVIDER_PAGER
             ,P1.PEO_RATE_DIFFERENTIAL AS SERVICE_PROVIDER_RATES
             ,P1.PEO_RATE_DIFFERENTIAL AS SER_PROV_SHIFT_DIFFERENTIAL
             ,PEOCITY.CITY_STATE_PROV_TEXT AS SERV_PROV_STATE_PROVINCE
             ,DECODE(P1.PEO_ACTIVE, 'Y', 'ACTIVE', 'INACTIVE') AS SERVICE_PROVIDER_STATUS
             ,P1.PEO_URL AS SERV_PROV_WEB_SITE_ADDRESS
             ,P1.PEO_PHONE AS SERVICE_PROVIDER_WORK_PHONE
             ,P1.PEO_POSTAL_CODE AS SERV_PROV_ZIP_POSTAL_CODE
    --         ,' ' AS SHIFT
    --         ,' ' AS SKILL
             ,DECODE(JT.JT_BIGSTATUS_ID,138813,'NEW'
                                       ,138814,'PENDING'
                                       ,138815,'OPEN'
                                       ,138816,'COMPLETED'
                                       ,138817,'CLOSED'
                                       ,138818,'CANCELLED',NULL,' ') AS STATUS
             ,LEV.LEVELS_NAME AS SUBREGION
    --         ,' ' AS TRADE
             ,P1.PEO_LS_INTERFACE_CODE1 AS VENDOR_ID
             ,P1.PEO_FAX AS VENDOR_PURCHASING_FAX
             ,P1.PEO_VENDOR_SITE_CODE AS VENDOR_SITECODE
             ,JT.JT_ID AS VENDOR_TICKET
             ,P1.PEO_NAME AS VENDOR_COMPANYNAME
             ,JT.JT_REQUESTOR_VIP AS VIP
             ,WO.WO_ID AS WORK_ORDER_NO
             ,JT.JT_ID AS WORK_REQUEST
             ,JT.JT_CLASS_ID AS WORK_REQUEST_CLASS
             ,WOTY.WORKTYPE_TEXT AS WORK_TYPE
    --         ,' ' AS WR_COST
             ,JT.JT_DESCRIPTION AS WR_DESCRIPTION
    --         ,' ' AS WR_DISPATCH_METHOD
             ,DECODE(JT.JT_BIGSTATUS_ID,138813,'NEW'
                                       ,138814,'PENDING'
                                       ,138815,'OPEN'
                                       ,138816,'COMPLETED'
                                       ,138817,'CLOSED'
                                       ,138818,'CANCELLED',NULL,' ') AS WR_STATUS
             ,CTRY.COUNTRY_NAME AS COUNTRY
             ,SYSDATE --LD_CURR_TIME
         FROM CITI.JOBTICKET JT,
              CITI.PROPERTY PROP,
              CITI.BLDG BL,
              CITI.BLDG_LEVELS BLDGLVL,
              CITI.LEVELS LEV,
              CITI.LEVELS PAR,
              (SELECT CRSTOOLS.STRAGG(PEO_NAME) FACILITY_MANAGER,
                      BLDGCON_BLDG_ID
                 FROM CITI.BLDG_CONTACTS, CITI.PEOPLE
                WHERE BLDGCON_PEO_ID = PEO_ID
                  AND BLDGCON_CONTYPE_ID IN (40181, 10142)
                GROUP BY BLDGCON_BLDG_ID) FMG,
              CITI.FLOORS FL,
              CITI.ROOM RM,
              CITI.GENERAL_LEDGER GL,
              CITI.LEGAL_ENTITY LE,
              CITI.COST_CENTER_CODES CC,
              CITI.EQUIPMENT EQP,
              CITI.WORKTYPE WOTY,
              CITI.SUBWORKTYPE SWOTY,
              CITI.WORK_ORDER WO,
              CITI.JT_WORKERS JTWO,
              CITI.PRIORITY,
              CITI.COUNTRY CTRY,
              CITI.PEOPLE P1,
              CITI.PEOPLE PEO3,
              CITI.PEOPLE PEO1,
              CITI.CITY PEOCITY,
              CITI.CURRENCY PEOCUR
        WHERE JT.JT_BLDG_ID = BL.BLDG_ID
          AND BL.BLDG_ID = BLDGLVL.BLDG_LEVELS_BLDG_ID
          AND BLDGLVL.BLDG_LEVELS_LEVELS_ID = LEV.LEVELS_ID
          AND LEV.LEVELS_PARENT = PAR.LEVELS_ID(+)
          AND PROP.PROPERTY_ID = BL.BLDG_PROPERTY_ID
          AND BL.BLDG_ACTIVE_LS = 'N'
          AND JT.JT_FLOORS_ID = FL.FLOORS_ID(+)
          AND JT.JT_ROOM_ID = RM.ROOM_ID(+)
          AND JT.JT_BLDG_ID = FMG.BLDGCON_BLDG_ID(+)
          AND JT.JT_GENLED_ID = GL.GENLED_ID(+)
          AND GL.GENLED_LGLENT_ID = LE.LGLENT_ID(+)
          AND JT.JT_CSTCTRCD_ID = CC.CSTCTRCD_ID(+)
          AND JT.JT_EQUIP_ID = EQP.EQUIP_ID(+)
          AND JT.JT_ID = JTWO.JTW_JT_ID(+)
          AND JT.JT_WORKTYPE_ID = WOTY.WORKTYPE_ID(+)
          AND JT.JT_SWORKTYPE_ID = SWOTY.SWORKTYPE_ID(+)
          AND JT.JT_WO_ID = WO.WO_ID
          AND JT.JT_PRIORITY_ID = PRIORITY_ID(+)
             --AND jt.jt_date_requested >= ADD_MONTHS (SYSDATE, -12)
          AND JT.JT_LAST_UPDATE >= ADD_MONTHS(LD_CURR_TIME, -12)
          AND BL.BLDG_COUNTRY_ID = CTRY.COUNTRY_ID
          AND JTWO.JTW_PEO_ID = P1.PEO_ID(+)
          AND P1.PEO_CITY_ID = PEOCITY.CITY_ID(+)
          AND JT.JT_COMPLETED_BY_PEO_ID = PEO3.PEO_ID(+)
          AND P1.PEO_RATE_CURRENCY_ID = PEOCUR.CURRENCY_ID(+)
          AND JT.JT_AGENT_PEO_ID = PEO1.PEO_ID(+)
       COMMIT;
    EXCEPTION
       WHEN OTHERS THEN
          ROLLBACK;
          DBMS_OUTPUT.PUT_LINE('SQLCODE :' || SQLCODE || ' Error :' || SQLERRM);
    END WORK_KIOSK_FULL;Here's the link for infor on the [Oracle Direct-Path INSERT |http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c21dlins.htm#10778].
    Also, if you are truly intent on using a CURSOR FOR LOOP with the BULK COLLECT, I suggest you read Steven Feuerstein's article [PL/SQL Practices: On BULK COLLECT |http://www.oracle.com/technology/oramag/oracle/08-mar/o28plsql.html].
    Hope this helps.
    Craig...
    If my response or the response of another was helpful, please mark it accordingly

  • Please help with an embedded query (INSERT RETURNING BULK COLLECT INTO)

    I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
    Here is a full query that use in the C# code
    string sql = "INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, " +
    "SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, " +
    "BENEFICIARY_FIRST_NAME, BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, " +
    "CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE, LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, " +
    "UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL, ATTENDING_PROVIDER_NUMBER, " +
    "BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI) " +
    "VALUES " +
    "(SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs, :REQUEST_METHOD_IDs, " +
    ":SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs, :SERVICE_LOCATION_STATEs, " +
    ":BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs, :HICNUMs, :CCNs, " +
    ":CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs, :CONTRACTOR_IDs, :PRIORITY_IDs, " +
    ":UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs, :ATTENDING_PROVIDER_NUMBERs, " +
    ":BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs, :STUDY_IDs, :REFERRING_NPIs) " +
    " RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs";
    int[] REQUEST_IDs = new int[range];
    cmd.Parameters.Add(":REQUEST_IDs", OracleDbType.Int32, REQUEST_IDs, System.Data.ParameterDirection.Output);
    However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
    Please help me resolve this error or I would appreciate a different solution
    Thank you

    It seems you are not doing a bulk insert but rather an array bind.
    (Which you will also find that it is problematic to do an INSERT with a bulk collect returning clause (while this works just fine for update/deletes) :
    http://www.oracle-developer.net/display.php?id=413)
    But you are using array bind, so you simply just need to use a
    ... Returning REQUEST_ID INTO :REQUEST_IDand that'll return you a Rquest_ID[]
    see below for a working example (I used a procedure but the result is the same)
    //Create Table Zzztab(Deptno Number, Deptname Varchar2(50) , Loc Varchar2(50) , State Varchar2(2) , Idno Number(10)) ;
    //create sequence zzzseq ;
    //CREATE OR REPLACE PROCEDURE ZZZ( P_DEPTNO   IN ZZZTAB.DEPTNO%TYPE,
    //                      P_DEPTNAME IN ZZZTAB.DEPTNAME%TYPE,
    //                      P_LOC      IN ZZZTAB.LOC%TYPE,
    //                      P_State    In Zzztab.State%Type ,
    //                      p_idno     out zzztab.idno%type
    //         IS
    //Begin
    //      Insert Into Zzztab (Deptno,   Deptname,   Loc,   State , Idno)
    //                  Values (P_Deptno, P_Deptname, P_Loc, P_State, Zzzseq.Nextval)
    //                  returning idno into p_idno;
    //END ZZZ;
    //Drop Procedure Zzz ;
    //Drop Sequence Zzzseq ;
    //drop Table Zzztab;
      class ArrayBind
        static void Main(string[] args)
          // Connect
            string connectStr = GetConnectionString();
          // Setup the Tables for sample
          Setup(connectStr);
          // Initialize array of data
          int[]    myArrayDeptNo   = new int[3]{1, 2, 3};
          String[] myArrayDeptName = {"Dev", "QA", "Facility"};
          String[] myArrayDeptLoc  = {"New York", "Chicago", "Texas"};
          String[] state = {"NY","IL","TX"} ;
          OracleConnection connection = new OracleConnection(connectStr);
          OracleCommand    command    = new OracleCommand (
            "zzz", connection);
          command.CommandType = CommandType.StoredProcedure;
          // Set the Array Size to 3. This applied to all the parameter in
          // associated with this command
          command.ArrayBindCount = 3;
          command.BindByName = true;
          // deptno parameter
          OracleParameter deptNoParam = new OracleParameter("p_deptno",OracleDbType.Int32);
          deptNoParam.Direction       = ParameterDirection.Input;
          deptNoParam.Value           = myArrayDeptNo;
          command.Parameters.Add(deptNoParam);
          // deptname parameter
          OracleParameter deptNameParam = new OracleParameter("p_deptname", OracleDbType.Varchar2);
          deptNameParam.Direction       = ParameterDirection.Input;
          deptNameParam.Value           = myArrayDeptName;
          command.Parameters.Add(deptNameParam);
          // loc parameter
          OracleParameter deptLocParam = new OracleParameter("p_loc", OracleDbType.Varchar2);
          deptLocParam.Direction       = ParameterDirection.Input;
          deptLocParam.Value           = myArrayDeptLoc;
          command.Parameters.Add(deptLocParam);
          //P_STATE -- -ARRAY
          OracleParameter stateParam = new OracleParameter("P_STATE", OracleDbType.Varchar2);
          stateParam.Direction = ParameterDirection.Input;
          stateParam.Value = state;
          command.Parameters.Add(stateParam);
                  //idParam-- ARRAY
          OracleParameter idParam = new OracleParameter("p_idno", OracleDbType.Int64 );
          idParam.Direction = ParameterDirection.Output ;
          idParam.OracleDbTypeEx = OracleDbType.Int64;
          command.Parameters.Add(idParam);
          try
            connection.Open();
            command.ExecuteNonQuery ();
            Console.WriteLine("{0} Rows Inserted", command.ArrayBindCount);
              //now cycle through the output param array
            foreach (Int64 i in (Int64[])idParam.Value)
                Console.WriteLine(i);
          catch (Exception e)
            Console.WriteLine("Execution Failed:" + e.Message);
          finally
            // connection, command used server side resource, dispose them
            // asap to conserve resource
            connection.Close();
            command.Dispose();
            connection.Dispose();
          Console.WriteLine("Press Enter to finish");
          Console.ReadKey();
        }

  • How to use bulk collect into clause

    hi all,
    i have requirement like this i want to change the query by passing the different table names in oracle database 10gr2.
    like if i use first i pass the scott.emp table name select * from scott.emp;
    then i want pass scott.dept table name select * from scott.dept;
    using select * option in the select list.
    how can i execute it.
    give me any solution.
    please reply....

    Hi,
    i recently also ran into some serious trouble to make dynamic sql work.
    It was about parallel pipelined function with strongly typed cursor (for "partition ... by hash(...)").
    But in addition requiring dynamic SQL for the input to this cursor.
    I couldn't make it work with execute immediate or something else.
    So i used another way - I translated dynamic SQL into dynamically created static SQL:
    1. create a base SQL data object type with abstract interface for code (e.g. some Execute() member function).
    2. dynamically create a derived SQL data object type with concrete implementation of Execute() holding your "dynamic SQL" "in a static way"
    3. delegate to Execute().
    Let me quote my example from comp.databases.oracle.server, thread "dynamically created cursor doesn't work for parallel pipelined functions"
    - pls. see below (it's an old one - with likely some odd stuff inside).
    It might sound some kind of strange for DB programmer.
    (I come from C++. Though this is not an excuse smile)
    Maybe i just missed another possible option to handle the problem.
    And it's a definitely verbose.
    But i think it's at least a (last) option.
    Actually i would be interested to hear, what others think about it.
    best regards,
    Frank
    --------------- snip -------------------------
    drop table parallel_test;
    drop type MyDoit;
    drop type BaseDoit;
    drop type ton;
    create type ton as table of number;
    CREATE TABLE parallel_test (
    id NUMBER(10),
    description VARCHAR2(50)
    BEGIN
    FOR i IN 1 .. 100000 LOOP
    INSERT INTO parallel_test (id, description)
    VALUES (i, 'Description or ' || i);
    END LOOP;
    COMMIT;
    END;
    create or replace type BaseDoit as object (
    id number,
    static function make(p_id in number)
    return BaseDoit,
    member procedure doit(
    p_sids in out nocopy ton,
    p_counts in out nocopy ton)
    ) not final;
    create or replace type body BaseDoit as
    static function make(p_id in number)
    return BaseDoit
    is
    begin
    return new BaseDoit(p_id);
    end;
    member procedure doit(
    p_sids in out nocopy ton,
    p_counts in out nocopy ton)
    is
    begin
    dbms_output.put_line('BaseDoit.doit(' || id || ') invoked...');
    end;
    end;
    -- Define a strongly typed REF CURSOR type.
    CREATE OR REPLACE PACKAGE parallel_ptf_api AS
    TYPE t_parallel_test_row IS RECORD (
    id1 NUMBER(10),
    desc1 VARCHAR2(50),
    id2 NUMBER(10),
    desc2 VARCHAR2(50),
    sid NUMBER
    TYPE t_parallel_test_tab IS TABLE OF t_parallel_test_row;
    TYPE t_parallel_test_ref_cursor IS REF CURSOR RETURN
    t_parallel_test_row;
    FUNCTION test_ptf (p_cursor IN t_parallel_test_ref_cursor)
    RETURN t_parallel_test_tab PIPELINED
    PARALLEL_ENABLE(PARTITION p_cursor BY any);
    END parallel_ptf_api;
    SHOW ERRORS
    CREATE OR REPLACE PACKAGE BODY parallel_ptf_api AS
    FUNCTION test_ptf (p_cursor IN t_parallel_test_ref_cursor)
    RETURN t_parallel_test_tab PIPELINED
    PARALLEL_ENABLE(PARTITION p_cursor BY any)
    IS
    l_row t_parallel_test_row;
    BEGIN
    LOOP
    FETCH p_cursor
    INTO l_row;
    EXIT WHEN p_cursor%NOTFOUND;
    select userenv('SID') into l_row.sid from dual;
    PIPE ROW (l_row);
    END LOOP;
    RETURN;
    END test_ptf;
    END parallel_ptf_api;
    SHOW ERRORS
    PROMPT
    PROMPT Serial Execution
    PROMPT ================
    SELECT sid, count(*)
    FROM TABLE(parallel_ptf_api.test_ptf(CURSOR(SELECT t1.id,
    t1.description, t2.id, t2.description, null
    FROM parallel_test t1,
    parallel_test t2
    where t1.id = t2.id
    ) t2
    GROUP BY sid;
    PROMPT
    PROMPT Parallel Execution
    PROMPT ==================
    SELECT sid, count(*)
    FROM TABLE(parallel_ptf_api.test_ptf(CURSOR(SELECT /*+
    parallel(t1,5) */ t1.id, t1.description, t2.id, t2.description, null
    FROM parallel_test t1,
    parallel_test t2
    where t1.id = t2.id
    ) t2
    GROUP BY sid;
    PROMPT
    PROMPT Parallel Execution 2
    PROMPT ==================
    set serveroutput on;
    declare
    v_sids ton := ton();
    v_counts ton := ton();
    -- v_cur parallel_ptf_api.t_parallel_test_ref_cursor;
    v_cur sys_refcursor;
    procedure OpenCursor(p_refCursor out sys_refcursor)
    is
    begin
    open p_refCursor for 'SELECT /*+ parallel(t1,5) */ t1.id,
    t1.description, t2.id, t2.description, null
    FROM parallel_test t1,
    parallel_test t2
    where t1.id = t2.id';
    end;
    begin
    OpenCursor(v_cur);
    SELECT sid, count(*) bulk collect into v_sids, v_counts
    FROM TABLE(parallel_ptf_api.test_ptf(v_cur)) t2
    GROUP BY sid;
    for i in v_sids.FIRST.. v_sids.LAST loop
    dbms_output.put_line (v_sids(i) || ', ' || v_counts(i));
    end loop;
    end;
    PROMPT
    PROMPT Parallel Execution 3
    PROMPT ==================
    set serveroutput on;
    declare
    instance BaseDoit;
    v_sids ton := ton();
    v_counts ton := ton();
    procedure CreateMyDoit
    is
    cmd varchar2(4096 char);
    begin
    cmd := 'create or replace type MyDoit under BaseDoit ( ' ||
    ' static function make(p_id in number) ' ||
    ' return MyDoit, ' ||
    ' overriding member procedure doit( ' ||
    ' p_sids in out nocopy ton, ' ||
    ' p_counts in out nocopy ton) ' ||
    execute immediate cmd;
    cmd := 'create or replace type body MyDoit as ' ||
    ' static function make(p_id in number) ' ||
    ' return MyDoit ' ||
    ' is ' ||
    ' begin ' ||
    ' return new MyDoit(p_id); ' ||
    ' end; ' ||
    ' ' ||
    ' overriding member procedure doit( ' ||
    ' p_sids in out nocopy ton, ' ||
    ' p_counts in out nocopy ton) ' ||
    ' is ' ||
    ' begin ' ||
    ' dbms_output.put_line(''MyDoit.doit('' || id || '')
    invoked...''); ' ||
    ' SELECT sid, count(*) bulk collect into p_sids, p_counts ' ||
    ' FROM TABLE(parallel_ptf_api.test_ptf(CURSOR( ' ||
    ' SELECT /*+ parallel(t1,5) */ t1.id, t1.description,
    t2.id, t2.description, null ' ||
    ' FROM parallel_test t1, parallel_test t2 ' ||
    ' where t1.id = t2.id ' ||
    ' ))) ' ||
    ' GROUP BY sid; ' ||
    ' end; ' ||
    ' end; ';
    execute immediate cmd;
    end;
    begin
    CreateMyDoit;
    execute immediate 'select MyDoit.Make(11) from dual' into instance;
    instance.doit(v_sids, v_counts);
    if v_sids.COUNT > 0 then
    for i in v_sids.FIRST.. v_sids.LAST loop
    dbms_output.put_line (v_sids(i) || ', ' || v_counts(i));
    end loop;
    end if;
    end;
    --------------- snap -------------------------

  • Please help with the query (INSERT RETURNING BULK COLLECT INTO)

    I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
    Here is a full query that use in the C# code
    INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, BENEFICIARY_FIRST_NAME,
    BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE,
    LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL,
    ATTENDING_PROVIDER_NUMBER, BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI)
    VALUES
    (SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs,
    :REQUEST_METHOD_IDs, :SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs,
    :SERVICE_LOCATION_STATEs, :BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs,
    :HICNUMs, :CCNs, :CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs,
    :CONTRACTOR_IDs, :PRIORITY_IDs, :UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs,
    :ATTENDING_PROVIDER_NUMBERs, :BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs,
    :STUDY_IDs, :REFERRING_NPIs) RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs
    However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
    Please help me resolve this error or I would appreciate a different solution
    Thank you

    You cannot use (and do not want to in this case) the BULK COLLECT.
    create table for_testing
       the_id      number not null primary key,
       some_data   number
    declare
       l_return_value for_testing.the_id%type;
    begin
      4 
       insert into for_testing
          the_id,
          some_data
       values
          1,
          5
       returning the_id into l_return_value;
       dbms_output.put_line('the return values is ' || l_return_value);
    end;
    20  /
    the return values is 1
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?Is a simple example. In the future, please use the tags to preserve formatting on your code like i have so it remains readable .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to tune this query for the improve performance ?

    Hi All,
    How to tune this query for the improve performance ?
    select a.claim_number,a.pay_cd,a.claim_occurrence_number,
    case
    when sum(case
    when a.payment_status_cd ='0'
    then a.payment_est_amt
    else 0
    end
    )=0
    then 0
    else (sum(case
    when a.payment_status_cd='0'and a.payment_est_amt > 0
    then a.payment_est_amt
    else 0
    end)
    - sum(case
    when a.payment_status_cd<>'0'
    then a.payment_amt
    else 0
    end))
    end as estimate
    from ins_claim_payment a
    where a.as_of_date between '31-jan-03' and '30-aug-06'
    and ( a.data_source = '25' or (a.data_source between '27' and '29'))
    and substr(a.pay_cd,1,1) IN ('2','3','4','8','9')
    group by a.claim_number, a.pay_cd, a.claim_occurrence_number
    Thank you,
    Mcka

    Mcka
    As well as EXPLAIN PLAN, let us know what proportion of rows are visited by this query. It may be that it is not using a full table scan when it should (or vice versa).
    And of course we'd need to know what indexes are available, and how selective they are for the predicated you have in this query ...
    Regards Nigel

  • How to convert a String which contains integers to an integer

    Hi, I'm doing a simple user-interaction program. For example I ask how many people are in a group. and they give me an answer with a integer number. But how can I convert the System.in to an real integer value, i.e. How can a String value which contain an integer convert to an integer value?
    InputStreamReader inputStreamR = new                               InputStreamReader(System.in);
    BufferedReader bufR = new BufferedReader(inputStreamR);
    String ans = bufR.readLine();
    and then what? (I want the answer is an integer);
    Thanks

    String ans = bufR.readLine();
    try {
      int ansAsInt = Integer.parseInt(ans);
    } catch (NumberFormatException nfe) {
      // What happens if the String was not an integer
    }

  • How to display a view which contain interactive form in an external window

    Anyone know how to display a view which contain interactive form in an external window?
    I managed to display the view in an internal window with the following code:
    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PdfReportWin");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
    For external window, I tried this method : wdComponentAPI.getWindowManager().createExternalWindow(String URL, String title, boolean modal) but there are no parameter for view name?
    Maybe this is not the correct way, really appreaciate if anyone can help.

    Hi,
                U need to the following
               1.Create another window
               2.Create a view in it tat contains Interacive form element.
               3. call this window dynamically thru the first window by creating a context element of IWDWindow  type
    The code may help:
      IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("SearchEmpwind");
          IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);
          window.setWindowPosition(WDWindowPos.CENTER);
          window.setWindowSize(400, 250);
          window.open();
          wdContext.currentContextElement().setEmpSearchWind(window);
    Regards
    Ishita

  • How do tune sql query? Can somebody help me in this? Atleast prescribe book

    how do tune sql query? Can somebody help me in this? Atleast prescribe a reference book.
    I am not able understand How to analyze tkproof output.

    Check out asktom.oracle.com
    Lot's of threads on interpreting tkprof output - no simple easy solution here.
    You need to understand what is happening and THINK. Then you can be a good engineer.
    As for good books...
    Tom Kyte's books are really, really good.
    http://www.amazon.com/Effective-Oracle-Design-Osborne-ORACLE/dp/0072230657/ref=sr_1_3?ie=UTF8&s=books&qid=1266783471&sr=8-3
    http://www.amazon.com/Expert-Oracle-Database-Architecture-Programming/dp/1590595300/ref=sr_1_1?ie=UTF8&s=books&qid=1266783471&sr=8-1
    Good luck!

  • How to tune the query...?

    Hi all,
    I am having a table with millions of records and the query is taking hours
    time. How to tune the query apart from doing the following things.
    1. Creating or Deleting indexes.
    2. Using Bind variables.
    3. Using Hints.
    4. Updating the Statitics regurarly.
    Actually, i have asked this question in interview how to tune the query.
    I told him the above 4 things. Then he told, these are not working, then
    how you will tune this query.
    Thanks in advance,
    Pal

    user546710 wrote:
    Actually, i have asked this question in interview how to tune the query.
    I told him the above 4 things. Then he told, these are not working, then
    how you will tune this query.It actually depends on the scenario/problem given.
    You may want to read this first.
    When your query takes too long ...
    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting

  • How to tune a query

    how to tune a query . what are the procedures?

    Following are the steps
    1. Learn about RDBMS.
    2. Learn how Oracle works. Oracle Architecture and other stuff.
    3. Learn how SQL works (because parsing makes difference)
    4. Learn about the tools provided by oracle for tuning (explain plan, sqltrace, tkprof etc.)
    One you have all these knowledge. You are all set for tuning.
    Thanks,
    Karthick.

  • (How) Can a SP call the Function which has BULK COLLECT return?

    I have a function using BULL COLLECT to put (XML data) many line into a table type record. (I had this as a function because it's gong to call many times).
    From one SP program, I will need to call it to get converted XML data info, how should i call it? If it's single line return, I could use
    my_result := get_tbl_xml(p_xml);
    but when it's table type, even I defined it, it still get error. Here is the program:
    Declare (at package spec)
    TYPE OrderDtl_Tab IS TABLE OF xxx%ROWTYPE INDEX BY BINARY_INTEGER;
    in_OrderDtlTab OrderDtl_Tab;
    FUNCTION get_tbl_xml (p_xml IN CLOB ) RETURN OrderDtl_Tab IS
    BEGIN
    SELECT extractvalue(VALUE(x), '/xxxx/xxxx') AS xxxx BULK COLLECT
    INTO in_OrderDtlTab
    FROM TABLE(xmlsequence(extract(xmltype(p_xml), '/Order/Lines/*'))) x;
    RETURN in_OrderDtlTab;
    END;
    PROCEDURE SAVE_A (p_xml IN CLOB )
    BEGIN
    --- how to call get_tbl_xml to get result, so I will be able to insert into DB table
    in_OrderDtlTab := get_tbl_xml(p_xml);
    END;
    --------------------------------------------------------------------------------------------------------------------

    May be this is better
    FUNCTION get_tbl_xml (p_xml IN CLOB ) RETURN OrderDtl_Tab IS
    BEGIN
    SELECT extractvalue(VALUE(x), '/xxxx/xxxx') AS xxxx BULK COLLECT
    INTO in_OrderDtlTab
    FROM TABLE(xmlsequence(extract(xmltype(p_xml), '/Order/Lines/*'))) x;
    RETURN in_OrderDtlTab;
    END;
    PROCEDURE SAVE_A (p_xml IN CLOB )
    yourrow your_table%rowtype;
    BEGIN
    --- how to call get_tbl_xml to get result, so I will be able to insert into DB table
    in_OrderDtlTab := get_tbl_xml(p_xml);
    FORALL myrowtype
    IN in_OrderDtlTab .FIRST .. in_OrderDtlTab .LAST
    INSERT INTO Your_table
    VALUES in_OrderDtlTab(yourrow);
    END;
    END;

  • Calling Stored procedure which uses Bulk Collect

    Hi All, I have Oracle stored procedure which uses Bulk Collect and returns table type parameter as output. Can anyone please help me how Can I call this kind of stored procedures which returns table type output using VB and Oracle's Driver. (I am successfully able to call using MS ODBC driver, but I want to use OraOLEDB driver.)

    861412 wrote:
    how Can I call this kind of stored procedures which returns table type output using VB and Oracle's Driver. This forum deals with the server-side languages SQL and PL/SQL.
    Your question deals with the client side and Visual Basic language.

  • ORA-06502 during a procedure which uses Bulk collect feature and nested tab

    Hello Friends,
    have created one procedure which uses Bulk collect and nested table to hold the bulk data. This procedure was using one cursor and a nested table with the same type as the cursor to hold data fetched from cursor. Bulk collection technique was used to collect data from cursor to nested table. But it is giving ORA-06502 error.
    I reduced code of procedure to following to trace the error point. But still error is comming. Please help us to find the cause and solve it.
    Script which is giving error:
    declare
    v_Errorflag BINARY_INTEGER;
    v_flag number := 1;
    CURSOR cur_terminal_info Is
    SELECT distinct
    'a' SettlementType
    FROM
    dual;
    TYPE typ_cur_terminal IS TABLE OF cur_terminal_info%ROWTYPE;
    Tab_Terminal_info typ_cur_Terminal;
    BEGIN
    v_Errorflag := 2;
    OPEN cur_terminal_info;
    LOOP
    v_Errorflag := 4;
    FETCH cur_terminal_info BULK COLLECT INTO tab_terminal_info LIMIT 300;
    EXIT WHEN cur_terminal_info%rowcount &lt;= 0;
    v_Errorflag := 5;
    FOR Y IN Tab_Terminal_Info.FIRST..tab_terminal_info.LAST
    LOOP
    dbms_output.put_line(v_flag);
    v_flag := v_flag + 1;
    end loop;
    END LOOP;
    v_Errorflag := 13;
    COMMIT;
    END;
    I have updated script as following to change datatype as varchar2 for nested table, but still same error is
    comming..
    declare
    v_Errorflag BINARY_INTEGER;
    v_flag number := 1;
    CURSOR cur_terminal_info Is
    SELECT distinct
    'a' SettlementType
    FROM
    dual;
    TYPE typ_cur_terminal IS TABLE OF varchar2(50);
    Tab_Terminal_info typ_cur_Terminal;
    BEGIN
    v_Errorflag := 2;
    OPEN cur_terminal_info;
    LOOP
    v_Errorflag := 4;
    FETCH cur_terminal_info BULK COLLECT INTO tab_terminal_info LIMIT 300;
    EXIT WHEN cur_terminal_info%rowcount &lt;= 0;
    v_Errorflag := 5;
    FOR Y IN Tab_Terminal_Info.FIRST..tab_terminal_info.LAST
    LOOP
    dbms_output.put_line(v_flag);
    v_flag := v_flag + 1;
    end loop;
    END LOOP;
    v_Errorflag := 13;
    COMMIT;
    I could not find the exact reason of error.
    Please help us to solve this error.
    Thanks and Regards..
    Dipali..

    Hello Friends,
    I got the solution.. :)
    I did one mistake in procedure where the loop should end.
    I used the statemetn: EXIT WHEN cur_terminal_info%rowcount &lt;= 0;
    But it should be: EXIT WHEN Tab_Terminal_Info.COUNT &lt;= 0;
    Now my script is working fine.. :)
    Thanks and Regards,
    Dipali..

  • Oracle sql query - bulk collect into a 50 element array,  to print them.

    INSERT INTO temp_mobile_donors_au
    select distinct d.donor_id
    from [email protected] d,
    blood_drives b,
    ds_malaria_travel_history h
    where b.site_code = 'NA19'
    and d.coll_date between trunc(add_months(sysdate,-24))
    and trunc(sysdate)
    and d.drive_id = 'DRV'||b.drive_id
    and h.donor_id = d.donor_id;
    I have 105 donors. I am taking these donors and have to print a report. I was using loop to print the donor sheet for each donor. Usually we have about 20 to 30 donors. So reports prints without any problem. Now we have about 105 donors and may be next time we may have more. So report does not print for all donors.
    I print reports using this command
    Cursor C2 is
    select distinct donor_id
    from temp_mobile_donors_au;
    Begin
    Open C2;
    Loop
    Fetch C2 into :param_donor_id;
    Exit when C2%notfound;
    print_mobile_donor_sheets_au;
    End loop;
    Close C2;
    End;
    procedure for print_mobile_donor_sheet_au----- is as below
    v_url_c := 'http://'||v_rep_server_c||'report=r_ds_travel_history1&param_donor_id='||:control.param_donor_id;
    Is there a way to iterate through a single cursor 50 rows at a time, bulk collect into a 50 element array, print them, bulk collect the next batch.
    Any idea or help?

    Here is a bulk-collect-limit example that got by googling:
    SET SERVEROUTPUT ON
    DECLARE
      TYPE t_bulk_collect_test_tab IS TABLE OF bulk_collect_test%ROWTYPE;
      l_tab    t_bulk_collect_test_tab;
      CURSOR c_data IS
        SELECT *
        FROM   bulk_collect_test;
    BEGIN
      OPEN c_data;
      LOOP
        FETCH c_data
        BULK COLLECT INTO l_tab LIMIT 10000; /*I think this is what you are looking for*/
        -- Process contents of collection here.
        DBMS_OUTPUT.put_line(l_tab.count || ‘ rows’);
        EXIT WHEN c_data%NOTFOUND;
      END LOOP
      CLOSE c_data;
    END;
    /So you need to three things:
    1.  TYPE t_bulk_collect_test_tab IS TABLE OF bulk_collect_test%ROWTYPE;
    2.  l_tab    t_bulk_collect_test_tab;
    3. FETCH c_data
             BULK COLLECT INTO l_tab LIMIT 10000; /* use your reqd value */Change your code and try.
    HTH

Maybe you are looking for

  • ORA-02248 when importing from the RAU

    Designer 6i rel. 4.6 ODS 10g rel. 9.0.4 Oracle 9.2.0.5 I did a full Designer 6i repository export from the RAU and then imported the dmp file into another Designer 6i repository from its RAU. The RAUs from both instances use the import/export utiliti

  • Updating data in jtable...

    hi everyone, I have some problem updating data in the jtable, first I get data from database and fill the table in with it...then the table just get disabled... i have a table called jTable, and a DefaultTableModel wich I applied the jTable with....h

  • Connect my VMWARE windows 7 to a Home group on a PC's Windows 7

    I am trying to set up a network using windows 7's homegroup option. I have successfully been able to link a number of PCs running windows 7 to a network. I am using the 3.1.2 version of VMware Fusion on my Mac and am running windows 7 as the operatin

  • LR 1.4 Question about Group Edit Capture Time

    Hey guys... working my way through... Was wondering -- when I highlight a group of files -- and then go to the Metadata Menu and choose "Edit Capture Time" -- why doesn't it change the date of all the High-Ligghted Photos? I am obviously doing someth

  • Want to unlock 4s

    This is Meg I am working in China and I have an contract-free iPhone 4s which is locked by verizon. Since I live in China, I don't have an verizon account or  wireless number.I am willing to request an unlock code via Email. Thank you.soryy,i can't o