with the use of the clause in the cursor
is it possible to use with the clause in the cursor declaration.See the simple example below.
It gives an error.
declare
cursor t is
(with Salvation as
(select * from pepole)
Select distinct hi.id of salvation where id = 55);
Start
null;
end;
Remove the outdoor set of parentheses.
declare
cursor t is
with hi as
(select * from emp )
select distinct sal from hi;
begin
null;
end;
Tags: Database
Similar Questions
-
I'm under 11 items on Windows 8. When I use the healing tool, the entire picture moves with the cursor. How can I fix it? Thank you!
Worked like a charm. Can't thank you enough, R Kelly!
Ken
-
problem with the CURSOR and WITH clause
Hi guys,.
I have never created a package before. I try to run it, but I get:
ORA-06550: line 8, column 16:
PLS-00382: expression is of the wrong type
ORA-06550: line 8, column 3:
PL/SQL: Statement ignored
I know that my problem is in the next section
OPEN FOR V_io_cursor
with GOT_R_NUM like)
Is the above correct?
When I copy paste the "heart" of the query, it works very well. I really have a problem with the CURSOR and the declaration.
Here's the code in its entirety. I know that the code is much more then he returned, but ignore this overload that was to do some tests to make sure that I can achieve any query request.
CREATE OR REPLACE
PKG_SPF_NATIONALREPORTS PACKAGE BODY IS
PROCEDURE GET_NATIONAL_TOTAL_RESULTS (P_SelectFields IN varchar2, P_SUMFields IN varchar2, io_cursor IN OUT C_RESULTS)
IS
v_io_cursor C_RESULTS;
BEGIN
OPEN FOR V_io_cursor
with GOT_R_NUM like)
SELECT
-START P_SelectFields
r.cli_served,
r.EIER,
-END P_SelectFields
r.RC,
r.Year_ID,
r.period_id,
r.agreement_type_ind,
CONTRACT_NUMBER. CONTRACT_NUMBER_TEXT,
YEARS.year_desc,
RC_CODE.rc_code_id,
RC_CODE.rc_code,
AHRDA HOLDERS. AHRDA_ID,
AHRDA HOLDERS. REGION_ID,
AHRDA HOLDERS. PROVINCE_ID,
AGREEMENT_TYPE. AGREEMENT_TYPE_ID,
AGREEMENT_TYPE. AGREEMENT_TYPE_DESC_EN,
ROW_NUMBER() over (partition R.YEAR_ID, R.CONTRACT_Number_Text
order by
P.PERIOD_desc
(/ / DESC NULLS LAST) AS r_num
RESULT r
JOIN period p ON r.period_id = p.period_id
JOIN CONTRACT_NUMBER ON r.contract_number_text = CONTRACT_NUMBER. CONTRACT_NUMBER_TEXT
JOIN RC_CODE ON contract_number.rc_code_id = rc_code.rc_code_id
JOIN AHRDA holders ON ahrda.ahrda_id = rc_code.ahrda_id
JOIN AGREEMENT_TYPE WE AHRDAS. AGREEMENT_TYPE_ID = AGREEMENT_TYPE. AGREEMENT_TYPE_id
JOIN the YEARS WE r.year_id = YEARS.year_id
)
SELECT year_desc
-START P_SUMFields
SUM (cli_served) AS sum_cli_served
The SUM (eier) AS sum_eier
-END P_SUMFields
OF got_r_num
GROUP BY year_desc
ORDER BY year_desc
;
io_cursor: = v_io_cursor;
END GET_NATIONAL_TOTAL_RESULTS;Agree - all this talk of loops FOR is completely irrelvant.
A refcursor is usually the exact mechanism to return a result set.What is C_RESULTS?
Just use SYS_REFCURSOR.
No need for local variable.
OUT why? Not just walk OUT?
PROCEDURE GET_NATIONAL_TOTAL_RESULTS (P_SelectFields IN varchar2, P_SUMFields IN varchar2, io_cursor OUT SYS_REFCURSOR) IS BEGIN OPEN io_cursor FOR ... END;
-
I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?
I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?
=================================
Change the text wrapping...In Word 2007... I'm going to... Format / dressing / thanks to...
Then I can use the arrow 4 positions to drag photos anywhere
I chose.If you want to drag the photos on the page...
I don't know how to do this. John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - to proceed at your own risk -
changing value of text with the cursor
Hi you all
I need a help from your side
I have created a slider and change the size of the listview text with the cursor
Here is my code
Slider { id: slider fromValue: 8.0 toValue: 16.0 value: 8.0 layoutProperties: StackLayoutProperties { spaceQuota: 0.1 } preferredWidth: 200.0 maxWidth: 250.0 preferredHeight: 20.0 visible: true enabled: false horizontalAlignment: HorizontalAlignment.Center onImmediateValueChanged: { // descriptionText is the id of label descriptionText.textStyle.fontSize = FontSize.PointValue descriptionText.textStyle.fontSizeValue = immediateValue } } /***********************************************************************// i am adding data to listview using remote source Container { id: listviewContainer layout: StackLayout { } ListView { id: myListView1 dataModel: dataModel1 //{ // source: "asset:///models/xmldata.xml" // } // Use a ListItemComponent to determine which property in the // data model is displayed for each list item listItemComponents: [ ListItemComponent { type: "item" Container { rightPadding: 20 leftPadding: 20 horizontalAlignment: HorizontalAlignment.Center verticalAlignment: VerticalAlignment.Center layout: StackLayout { orientation: LayoutOrientation.TopToBottom } Container { topPadding: 40 horizontalAlignment: HorizontalAlignment.Fill layout: DockLayout { } // The Item content container Container { verticalAlignment: VerticalAlignment.Top horizontalAlignment: HorizontalAlignment.Right layout: StackLayout { orientation: LayoutOrientation.RightToLeft } } } // Description text label Label { id: descriptionText // // objectName: descriptionText // leftMargin: 20 horizontalAlignment: HorizontalAlignment.Right verticalAlignment: VerticalAlignment.Top text : ListItemData.des textStyle.color: Color.create("#868686") textStyle.textAlign: TextAlign.Justify multiline: true textFormat: TextFormat.Plain textStyle.fontSizeValue: 8.0 } } } ] } attachedObjects: [ GroupDataModel { id: dataModel1 // Sort the data in the data model by the "pubDate" field, in // descending order, without any automatic grouping sortingKeys: [ "date" ] //[ "pubDate" ] sortedAscending: false grouping: ItemGrouping.None }, DataSource { id: dataSource1 objectName: "" // Load the XML data from a remote data source, specifying that the // "item" data items should be loaded source:"http://10.121.10.139/simplehtmldom/getdescnews.php?newsid="+dataSource1.objectName query: "/news/property/" type: DataSourceType.Xml onDataLoaded: { // After the data is loaded, clear any existing items in the data // model and populate it with the new data dataModel1.clear(); dataModel1.insert(data) myIndicator12321.setRunning(false); myIndicator12321.setVisible(false); // dataModel.insert(data) } } ] } // in the end i am calling on creating complete onCreationCompleted: { // When the top-level Page is created, direct the data source to start // loading data dataSource1.load(); }
problem I am facing is, it does not find the descriptionText variable, which is the id of the label
can someone help?
OK, the problem is that listItemComponents attached to a control, such as ListView have their own context. ListItemComponent documentation refers to what I think. If you must do the following:
1. do you have a property that is defined as an attribute of the ListView
2 bind your fontSizeValue to listItemComponent tag to the ListView. Note, however, to do this, you need to get a reference to the ListView using your label ListItem.view is found in the container. Not obvious, I know.
3. do you have your cursor to update the property you have defined for the ListView.
Cursor---> p_font_size ListView property<---------->---------->
Like this:
{To ListView
ID: myListView1
property real p_font_size: 10listItemComponents:]
{ListItemComponent}
type: 'point '.
ID: sample{Of container
ID: mainListViewContainer{Label
ID: descriptionText..........
textStyle.fontSize: FontSize.PointValue
textStyle.fontSizeValue: mainListViewContainer.ListItem.view.p_font_size}
and elsewhere on your page
Slider {}
ID: sliderfromValue: 8.0
toValue: 16.0
value: 8.0
layoutProperties: {StackLayoutProperties}
spaceQuota: 0.1
}
preferredWidth: 200.0
maxWidth: 250,0
preferredHeight: 20.0
visible: true
enabled: true
horizontalAlignment: PonImmediateValueChanged: {}
myListView1.p_font_size = immediateValue
}
}I test it and it works. Please make this response as the solution if it works for you too :-)
-
I had a very unusual event this morning. I am running Windows 7 on a desktop computer. On startup, I reached the login screen and proceeded to connect to my name. Prior to loading the desktop computer, however, I was in a black screen with the cursor visible.
1. I am able to load successfully under another user ID.
2. I am able to boot in safe mode (with networking) using my own code.
3. I did a system restore with no luck. The problem persists.
4. I don't think it's a driver issue because it would affect the two IDS and who does not.
5. I have a touch screen and the white slider moves even in the place where I touch. (what works)Issues related to the:
1. what "custom" setting would result in a shift of the display of this type?
2. If I go to Windows 8, will I have the opportunity to 'reset' my display options? Or it will automatically upgrade to the wrong setting?
Thank you. Any guidance would be greatly appreciated.
Thank you for your solution.
The problem turned out to be the result of a combination of events.
1. I did a change of media display a week ago but never restarted.
2 MS did the periodic security update that rebooted the machine overnight.
3. the update may have actually been in the middle of the installation when I got to my machine in the morning.
4. when the screen has not responded, I restarted manually by pressing the power button.Ultimately, I was able to access Task Manager and found several instances of several components running. When I "force stop" several of them, the office completed and I was in business.
I still have the wide black border around my 'Live TV' screen in Windows Media Center, but that's another question for another time.
Once again, thank you for the time spent to help me.
Best regards
Steve
-
* Original title: Admin Login
On my laptop Windows 8, I can't connect to my admin user or even use my administrative password. Whenever I try to open a session in his will just a black screen with the cursor, and when I try to use my password it dims the screen and I can't do anything. Is there anyway that I can fix this?
I solved the problem by resetting my laptop using the recovery mode.
-
When I create a rectangle, I can not not change the shape of a rectangle with the cursor in illustrator CC 2014 for what?
Xavigarcia,
I'm afraid that have met you the Rectangle Live bug that is limited to the MAC versions from 10.7 and 10.8, but not of 10.9 (Mavericks) or 10.10 (Yosemite). If all goes well, the bug will be fixed soon.
Thus, a switch for the Mavericks or Yosemite with a reinstall might be the way to solve it here and now.
To get around it, in each case, it is possible to develop direct Rectangles to get the normal old shaped rectangles or Pathfinder > unit, or use the scale tool or the free transform tool.
A more permanent way round that is to create normal old shaped rectangles, after running the free script created by Pawel, see this thread with download link:
-
[Cp] Select object on the timeline and move it on the slide with the cursor keys?
Hello
I don't know if there is a shortcut for this:
Sometimes it is easier to select an object in the timeline, but if you try to use the cursor keys to move, you move IN the timeline panel.
Is it possible to move to the slide edition?
Thank you.
PJ
I just found the answer:
-Click on the layer in the timeline of the object
-move the mouse over the object on the slide: you can move with the cursor keys.
-
For loops with the cursor line and indexing
Hi all
I have a question about the loops with the cursor, line and indexing.
How can I scan via a cursor with an iterator?
I would use an iterator as
Whole LoopIndex;
Whole LoopIndex2;
for LoopIndex at the beginning of the cursor at the end of the cursor
loop
line =: cursor [LoopIndex];
for LoopIndex2 of LoopIndex at the end of the cursor
etc...
end loop;
I need to use an iterator because I need to use a nested for loop.
OR
How can I solve the following problem?
Class name % ofClass average test Score
1 Niobe 7 8 8.4
1 alena 4 7 7.5
1 9 7 8.9 Estia
1 Lilly 10 8 9.8
1 Sandra 6 8 8.3
1 Melanie 8 8 8.1
Nadia 2 8 3 4.4
Sayuki 2 9 8 8.4
Diasy 2 7 8 8.0
Flower 2 7 8 6.5
Diana 2 6 8 7.3
3 Flora 7 8 5.8
Sukiya 3 4 8 8.4
Samantha 3 10 8 7.7
Roxanne 3 7 8 6.9
Eline 3 8 8 7.4
I need to
-By class, I need to recalculate each average people
-By class, I need to calculate the % of class score (sum averages / people in the class)
So it can be done in a nested for loop?
Or do I just step by step?Well, based on this information it would be something like...
SQL> ed Wrote file afiedt.buf 1 with t as (select 1 as Class, 'Niobe' as Nm, 7 as Score, 8 as Tests, 8.4 as Average from dual union all 2 select 1, 'Alena', 4, 7, 7.5 from dual union all 3 select 1, 'Estia', 9, 7, 8.9 from dual union all 4 select 1, 'Lilly', 10, 8, 9.8 from dual union all 5 select 1, 'Sandra', 6, 8, 8.3 from dual union all 6 select 1, 'Melanie', 8, 8, 8.1 from dual union all 7 select 2, 'Nadia', 3, 8, 4.4 from dual union all 8 select 2, 'Sayuki', 9, 8, 8.4 from dual union all 9 select 2, 'Diasy', 7, 8, 8.0 from dual union all 10 select 2, 'Blossom', 7, 8, 6.5 from dual union all 11 select 2, 'Diana', 6, 8, 7.3 from dual union all 12 select 3, 'Flora', 7, 8, 5.8 from dual union all 13 select 3, 'Sukiya', 4, 8, 8.4 from dual union all 14 select 3, 'Samantha', 10, 8, 7.7 from dual union all 15 select 3, 'Roxanne', 7, 8, 6.9 from dual union all 16 select 3, 'Eline', 8, 8, 7.4 from dual) 17 -- 18 -- END OF TEST DATA 19 -- 20 select class, nm as "NAME", score, tests, average 21 ,round(((average*tests)+score)/(tests+1),1) as avg_person 22 ,round((average / sum(average) over (partition by class))*100,1) as class_average 23 from t 24* order by class, nm SQL> / CLASS NAME SCORE TESTS AVERAGE AVG_PERSON CLASS_AVERAGE ---------- -------- ---------- ---------- ---------- ---------- ------------- 1 Alena 4 7 7.5 7.1 14.7 1 Estia 9 7 8.9 8.9 17.5 1 Lilly 10 8 9.8 9.8 19.2 1 Melanie 8 8 8.1 8.1 15.9 1 Niobe 7 8 8.4 8.2 16.5 1 Sandra 6 8 8.3 8 16.3 2 Blossom 7 8 6.5 6.6 18.8 2 Diana 6 8 7.3 7.2 21.1 2 Diasy 7 8 8 7.9 23.1 2 Nadia 3 8 4.4 4.2 12.7 2 Sayuki 9 8 8.4 8.5 24.3 3 Eline 8 8 7.4 7.5 20.4 3 Flora 7 8 5.8 5.9 16 3 Roxanne 7 8 6.9 6.9 19.1 3 Samantha 10 8 7.7 8 21.3 3 Sukiya 4 8 8.4 7.9 23.2 16 rows selected.
-
Windows xp black screen with the cursor
Windows xp black screen with the cursor
Hello
You did it changes on the computer before the problem started?
You are able to start the computer in safe mode?If you cannot start the computer in safe mode , and then follow the steps in the article mentioned below.
Computer stops responding with a black screen when you start Windows XP:
http://support.Microsoft.com/kb/314503Kind regards
Afzal Taher - Microsoft technical support.
Visit our Microsoft answers Feedback Forum and tell us what you think. -
disable the box around cursor; box moves with the cursor
suddenly, a transparent box appears around the cursor and moves with him. Cannot delete the box that moves with the cursor... tried to personalize, mouse pointers, etc. The default tab has been grayed out, so would not activate.
Hello
Looks like you have turned on the magnifying glass.
Open Control Panel / ease of access Center.
Click the make the computer easier to see.
Scroll to the bottom and Remove the check mark from the option turn on Magnifier .
Let us know the results.
Concerning
-
How to open the page with the cursor in a location set
We have a page for a connection, and I want the page opens with the cursor positioned at this place. Here's the code we which seems like it should work, but it doesn't. It's a page someone else created, and as a new user of DreamWeaver, I don't know how it was created to begin with, so don't know how to fix (or start again). Any advice? Thank you
<!--
int position_cursor()
{
document. Login.txtUserName.focus ();
}
//-->
< td height = "47" valign = "bottom" width = "187" > < input type = "text" name = 'txtUserName' / > < table >
Above all, change it.
<>
on this subject.
<>
Then, the code that you have demonstrated should work. However, to change this-
document.getElementById('txtUserName').focus ();
and this
on this subject.
And it will work.
(Note: If this does not work, then please post the whole page code in a response.)
-
Procedure failed when using bulk collect clause and works with the cursor
Hi all
I use "BULK collect into" clause in my procedure and it is a failure after 21 minutes and gives the error "end of file communication channel.
After that this error comes when I tried to connect the database it gives following error.
ORA-01034 - Oracle is not available.
ORA - 27101-shared memory realm does not exist.
SVR4 error: 2: no such file or directory.
When I use the cursor instead of the COLLECTION in BULK IN the clause, it runs successfully.
Following the code works with the slider.
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, 'BILLABLE CLIENT. "
138803, "CONTRACTED"
"138804, ' BILLABLE IN-HOUSE."
NULL, ' '
) Billable.
BL.bldg_name_cc 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."
141522, "NEGLIGENCE."
141523, "ACCIDENTAL."
141524, "MECHANICAL FAILURE."
141525, "CONTROL."
141526, "VANDAL."
141527, 'STANDARD ',.
141528, "WORK PROJECT",.
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, "AVAILABILITY OF THE HAND ŒUVRE."
139952, "WORK DEFERRED-HI PRI."
139953, "APPROVAL OF WIND TURBINES."
139954, "FUNDING."
139955, "ACCESS DENIED."
139956, "WTG MATERIAL."
NULL, ' '
) AS deferral_reason,
JT.jt_description as description,
JT.jt_date_resched_ecd IN the development of the young child,
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 OPEN CORRECTION."
138835, "OPEN REQUEST CUSTOMER."
138836, "CORRECTIVE MAINTENANCE",.
138837, "BOOKING CONFERENCE ROOM."
138838, "PROJECT INITIATED REQUEST."
138839, "PLANNED PREVENTATIVE MAINTENANCE."
138840, "COULD START FREE APPLICATION."
NULL, ' '
) AS originator_type,
"" AS payment_terms, priority_text AS priority_code,
swoty.sworktype_text AS problem_type,
Prop.property_name_cc as a property,
JT.jt_cost_quote_total AS quote_total,
par.levels_name IN the region,
DECODE (jt.jt_repdef_id,
141534, 'ADJUSTED SETTING. "
141535, "THE TRAINING OF THE END,"
141536, "NEW REQUEST"
141537, "NO INVESTIGATION OF REPAIR."
141538 "REPLACED PARTS."
141539, 'REPLACE EQUIPMEN.
1000699, "NEW REQUEST"
NULL, ' '
) AS repair_definitions,
JT.jt_repairdesc AS MARKED_COR,
JT.jt_requestor AS applicant, ' ' 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,
"" LIKE response_time, rm.room_name_cc 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, ' ' shift, as.
' ' AS skill,.
DECODE (jt.jt_bigstatus_id,
138813, «NEWS»,
138814 "PENDING."
138815, 'OPEN ',.
138816, "END."
138817, 'CLOSED ',.
138818, "CANCELLED."
NULL, ' '
) The STATUS,
Lev.levels_name IN the subregion, ' ' IN the 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, «NEWS»,
138814 "PENDING."
138815, 'OPEN ',.
138816, "END."
138817, 'CLOSED ',.
138818, "CANCELLED."
NULL, ' '
) AS wr_status,
ctrY.country_name as a country
OF citi.jobticket jt,.
Citi.Property prop,
Citi.Bldg bl,
Citi.bldg_levels bldglvl,
civil LEVEL lev,
civil by LEVELS.
(SELECT crstools.stragg (peo_name) facility_manager,
bldgcon_bldg_id
OF citi.bldg_contacts, citi.people
WHERE bldgcon_peo_id = peo_id
AND IN bldgcon_contype_id (40181, 10142)
FMG GROUP BY bldgcon_bldg_id),
Citi.floors, fl,
Citi.Room rm,
Citi.general_ledger gl,
the Citi.legal_entity
Citi.cost_center_codes cc,
Citi.Equipment eqp,
Citi.workType woty,
Citi.subworktype swoty,
Citi.work_order wo,
Jtwo Citi.jt_workers,
Citi.Priority,
Ctry Citi.Country,
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
run immediately 'truncate table crstools.drt_bom_work_kiosk;
Select sysdate in double ld_curr_time;
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
DPE
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
MARKED_COR
APPLICANT
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
MAJ
SKILLS
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
BILLABLE cur_rec.
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, DEVELOPMENT OF THE YOUNG CHILD
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, MARKED_COR
cur_rec, APPLICANT
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, UPDATE
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
while 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 big collect in would adopt.
Please help me why this is happening.
Thanks and greetings
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 change the data inserted so that you could not encapsulate the changes in a query, but you do an insert in right in the table of your cursor. A much more effective way would be to use the following changes I made to your code sample:
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 is the link for infor the [Oracle Direct - Path INSERT | http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c21dlins.htm#10778].
Also, if you are really wanting to use a CURSOR for LOOP COLLECTION in BULK, I suggest you read the article by Steven Feuerstein [PL/SQL practices: GEM VRAC | http://www.oracle.com/technology/oramag/oracle/08-mar/o28plsql.html].
I hope this helps.
Craig...If my response or response from another person was helpful, please mark accordingly
-
problem with the cursor while using 'disqus '.
Slider corresponds to the normal arrow almost everywhere on the net, but when I use it on a blog like Disqus, the cursor turns into something like a capitol.
Hello
I suggest you to contact the support of Disqus and verify.
-
cursor Details mode not aligned with the cursor in the image when you use adaptive wide angle
Imported a Fuji raw image in Ps 2015 CCfrom Lr 6. The cursor is in the detail view does not point to the same place in the image. There is a lag of about 0.25 inch, regarding the image of the screen
There was a problem with that in Camera Raw, but I'm not sure LR & PS. It happened on Windows, when the size of the default text for the operating system was not set to 100%. I thought that this problem has been fixed in the latest updates of ACR.
Maybe you are looking for
-
HP Pavilion &; "Windows 7 Upgrade Advisor came across a problem.
Windows 7 would work on my laptop (HP Pavilion dv6132eu)? So I used "Windows 7 Upgrade Advisor" of the Microsofts. Which caused the error "Windows 7 Upgrade Advisor stumbled into a problem that your scanning devices. Upgrade Advisor needs to be able
-
Save more than 16 channels in a file
Hi, I use lots of Dasylab and would like to save about 25 channels to the same ASCII file, I have used the write data module, but it is limited to 16 channels. Is it possible to get all 25 channels to write to the same file, so I don't have to have s
-
How can I fix problems identified in reliability monitor
computer acted weird-lawful when I turn it on, it emits a continuous beep which increases in volume until it reaches a level almost Earwig. Critical error messages appear in the reliability monitor newspaper that is to say of prevhost.exe, rundll32.e
-
Hi all I have a little problem concerning ASA and syslogs. I have a tunnel from site to site between a local ASA and ASA distance. Behind the ASA local, I have a central syslog server (which has no ASA as default gateway) which collects messages from
-
Hello. I had a subscription for shares adobe with my creative cloud subscription. I had about 30-40 credits on my account. My account has been canceled because I was offline for a month after moving. I recently renewed my account, however, the credit