Help about concurrency in procedure
create or replace
procedure Cau_1
(ngayBatDau date,
ngayKetThuc date,
hinhThucNganSach tonghopngansach.loaingansach%type,
iDChiPhi chiphi.id%type)
as
begin
set transaction isolation level serializable;
cursor iDchiPhi_cursor is (select idchiphi from tonghopngansach where tungay >= ngaybatdau and denngay <= ngayketthuc);
tongSoTien tonghopngansach.sotien%type;
iDChiPhitemp tonghopngansach.idchiphi%type;
soTien1ID float:=0;
begin
open idChiPhi_cursor;
fetch idChiPhi_cursor into idchiphitemp;
if idchiphi is not null then
while iDchiPhi_cursor%found
loop
if idchiphi=idchiphitemp then
select sotien
into soTien1id
from tonghopngansach
where idchiphi=idchiphitemp;
tongSoTien:=tongSoTien+soTien1id;
end if;
if Error != 0 then
begin
rollback;
end if;
fetch idChiPhi_cursor into idchiphitemp;
end loop;
insert into tonghopngansach(idchiphi,tungay,denngay,sotien,loaingansach)
values(idchiphi,ngaybatdau,ngayketthuc,tongSoTien,hinhthucngansach);
end if;
if idchiphi is null then
while iDchiPhi_cursor%found
loop
select sotien
into soTien1id
from tonghopngansach
where idchiphi=idchiphitemp;
tongSoTien:=tongSoTien+soTien1id;
if Error != 0 then
* begin*
rollback;
* end if;*
fetch idChiPhi_cursor into idchiphitemp;
end loop;
end if;
insert into tonghopngansach(idchiphi,tungay,denngay,sotien,loaingansach)
values ('Tong Hop',ngaybatdau,ngayketthuc,tongSoTien,hinhthucngansach);
end;
comit;
when I run in sqldeveloper, it's error. I don't know where is error. please help me. Thanks
Edited by: [email protected] on 13:41 01-06-2010
Edited by: [email protected] on 13:42 01-06-2010
Can you take about 27 steps backwards and explain WHY you think you need to set your transaction isolation level?
This isn't something typically required ... i won't say it's never required, but i've seen nothing in your post to suggest
1) you know what you are doing with it
2) that is is actually a requirement for what you are attempting to do.
Oracle is NOT SQLServer, they are quite dissimilar in many respects. If you can explain what you need to do (from a business perspective, a user need if you will) then we will be in a much better position to explain to you how to implement your logic in ORACLE.
This becomes infinitely easier if you provide
1) the objects you are working with (DDL / CREATE TABLE statements)
2) the data you have in the objects you are working with (INSERT statements to populate the objects in #1)
3) the desired results
4) an explanation of the process that produces the desired results
5) your Oracle version
select * from v$version;And finally, format your code and use the tags around it to preserve the formatting so other can read it without having an aneurysm.
I see you are new to the forum, so reading the FAQ wouldn't be a bad thing for you to do.
http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
Similar Messages
-
Need help about how to capture the name of an object before inserting.
Hi everybody,
how i can capture the name of an object before it inserts in a table.
i will use a pre-insert trigger to do this, but i don't know how to specify the name of the object that's inserting.
any help about this issue will be appreciated.Mentioning objects you mean: You have a procedure which inserts data into some table and this procedure needs to know the name of the caller (another procedure or ...)
Can this be of some help http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:382218730166 ?
Regards
Etbin -
need help about 1015 it says connect iphone to itunes on screen i did it but it doesnt work and says unexpected 1015
Try restoring it: Make sure you are following the instructions in this procedure to the letter. Here they are, with emphasis on some easily overlooked requirements:
Disconnect the USB cable from the iPhone, but leave the other end of the cable connected to your computer's USB port.
Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.If you cannot turn off the device using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the device turns off, release only the Sleep/Wake button.
Continue pressing and holding the Home button while you reconnect the USB cable to the device. The device should turn on.
Note: If you see the "low battery" screen, let the device charge for at least ten minutes to ensure that the battery has some charge, and then start with step 2 again.
Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears (iTunes icon and USB connector) release the Home button.
If necessary, open iTunes. You should see the "recovery mode" alert ("iTunes has detected a phone in recovery mode").
Use iTunes to restore the device.
If you do not see the "Connect to iTunes" screen, try these steps again.
If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
If you have backed up the iPhone in the past, select the device in iTunes and choose "restore from backup". -
About the pricing procedure of purchasing order
Hello friends,
can anyone tell me about the pricing procedure,conditions & texation of Purchase order?
and hoew to maintain all those term in Customisation?The Basic thing is Condition Technique. In which there are
1. Access Sequence 2. Condition Record 3. Condition Type 4. Condition Table.
A Access Sequence access a Condition Record of a Condition Type in a Condition Table is a Condition Technique.This is a simple logic
Here the Condition Type is very important like PB00, PBXX,RA01 etc.
In the background every Condition Type has its own defition means the purpose of the Condition Type like, is it for Pricing or Percentage, Quntity base, Accrual Feilds etc is to be defined to work this functions. Normally we use the existing ones without any risk. But some cases, we have to Create a New Condition Types as per the organisation requirement.
The Pricing Schema is useful to minimise condition types while mention prices for Vendor on the basis of Pricing Schema which we defined according to organisation requirement.
The Pricing Schema means the calculations procedure of Condition Type.
Ex. RA01 - Discoount % is caclulated on PB00 - Gross Price means
RA01 is based on PB00 like that we have to define in the Pricing Schema
which makes easy to use in real time.
Here PB00 has the Access Sequence - 0002.
But RA01 does not have the Access Sequence.Why because it is a dependent on PB00. But both are Condition Types.
In the system, by default some standard Scheme will be there at Vendor Schema Group in the Vendor Master Screen means the standard one is assigned which is very lengthy which may fullfil our requirement. But some cases which may not fullfil our requirement, in such we have to define.
For the configuration, I may not able to explain properly through here but will give some idea.
Configuration: SPRO - IMG - Material Management - Purchasing - Conditions - Define Price Deternmination Process:
1. Define Access Sequence
2. Define Condition Type
3. Defince Calculation Schema:- Here you have to define the Schema - Define Schema group
1. Define Schema Group vendor
2. Define Pricing Schema group
3. Schema group for Purchase Organisation
4. Assign Schema group to Purchase Organisation - Define Schema determination
1.define calculation schema for Standard purchase organisation
After completion of the Schema Group, we have to assign it to Vendors.
Then whenever we use any transaction with this Vendor, the concerned Schema will work as configured by us.
The Pricing in MM is vast because each Condition have its own importance and each Access Sequence have its own importance. So you need not bother about this. First you learn how to define the Calculation Schema through the above. -
HELP about analog output video
Hello, I´m need help about analog output video in Premiere CS5 using Matrox RTX2. I need to crop a video with resolution in 1440x1080 to 4:3 in output analog. But what happens is wrong (I think). My video is in format anamorphic and the other option is 16:9 letterbox. Is there any way to crop the video without using effects. Thanks a Lot and sorry my bad english (my native language is Portuguese).
There are no 4:3 HD specifications. You'll have to put the video into a normal SD sequence, and scale it down till the top and bottom of the video meet the frame. That way the sides will be cut off.
-
Help about Warning Security IE 8.0
Hello Guys,
I need help about warning security IE 8.0.
When I try install a software from my webserver is display the following message:
I can't check the publisher.Are you sure install the software?
This file does not have a valide digital signature that verifies its publisher.
You should only install software from publishers you trust.
Well, I already enable:
Download signed ActiveX controls
Download unsigned ActiveX controls
Allow active content from CDs to run on user machines Enabled
Allow software to run or install even if the signature is invalid Enabled
Check for server certificate revocation Disabled
Check for signatures on downloaded programs Disabled
Is there somewhere I disable all settings warning's about IE or one specific GPO I need disable for this warning don't display for me?
In the same installation a lot of about file .cab are installed, only one specifc I don't have sucess.
I try some troubleshootings too:
https://social.technet.microsoft.com/Forums/windows/en-US/8f8293c4-0920-462f-9c69-0a8e3f92aa02/unknown-publishers-warning
https://www.youtube.com/watch?v=UknQn6tZZis
http://windows-3322.blogspot.com.br/2011/02/how-to-repair-activex-error.html
Thanks a lot who answer me or about any idea about my issue.This file does not have a valide digital signature that verifies its publisher.
Did you see your result
https://social.technet.microsoft.com/Forums/windows/en-US/8f8293c4-0920-462f-9c69-0a8e3f92aa02/unknown-publishers-warning
<quote>
Changing the time zone actually worked.
</quote>
Robert Aldwinckle -
Need Help With a Stored Procedure
Help With a Stored Procedure
Hi everyone.
I am quite new relative to creating stored procedures, so I anticipate that whatever help I could get here would be very much helpful.
Anyway, here is my case:
I have a table where I need to update some fields with values coming from other tables. The other tables, let us just name as tblRef1, tblRef2 and tblRef3. For clarity, let us name tblToUpdate as my table to update. tblToUpdate has the following fields.
PlanID
EmployeeIndicator
UpdatedBy
CreatedBy
tblRef1, tblRef2 and tblRef3 has the following fields:
UserName
EmpIndicator
UserID
In my stored procedure, I need to perform the following:
1. Check each row in the tblToUpdate table. Get the CreatedBy value and compare the same to the UserName and UserID field of tblRef1. If no value exists in tblRef1, I then proceed to check if the value exists in the same fields in tblRef2 and tblRef3.
2. If the value is found, then I would update the EmployeeIndicator field in tblToUpdate with the value found on either tblRef1, tblRef2 or tblRef3.
I am having some trouble writing the stored procedure to accomplish this. So far, I have written is the following:
CREATE OR REPLACE PROCEDURE Proc_Upd IS v_rec NUMBER;
v_plan_no tblToUpdate.PLANID%TYPE;
v_ref_ind tblToUpdate.EMPLOYEEINDICATOR%TYPE;
v_update_user tblToUpdate.UPDATEDBY%TYPE;
v_created_by tblToUpdate.CREATEDBY%TYPE;
v_correct_ref_ind tblToUpdate.EMPLOYEEIDICATOR%TYPE;
CURSOR cur_plan IS SELECT PlanID, EmployeeIndicator, UPPER(UpdatedBy), UPPER(CreatedBy) FROM tblToUpdate;
BEGIN
Open cur_plan;
LOOP
FETCH cur_plan INTO v_plan_no, v_ref_ind, v_update_user, v_created_by;
EXIT WHEN cur_plan%NOTFOUND;
BEGIN
-- Check if v_created_by has value.
IF v_created_by IS NOT NULL THEN
-- Get the EmpIndicator from the tblRef1, tblRef2 or tblRef3 based on CreatedBy
SELECT UPPER(EmpIndicator)
INTO v_correct_ref_ind
FROM tblRef1
WHERE UPPER(USERNAME) = v_created_by
OR UPPER(USERID) = v_created_by;
IF v_correct_ref_ind IS NOT NULL THEN
-- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
ELSIF
-- Check the Other tables here????
END IF;
ELSIF v_created_by IS NULL THEN
-- Get the EmpIndicator based on the UpdatedBy
SELECT UPPER(EmpIndicator)
INTO v_correct_ref_ind
FROM tblRef1
WHERE UPPER(USERNAME) = v_update_user
OR UPPER(USERID) = v_created_by;
IF v_correct_ref_ind IS NOT NULL THEN
-- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
ELSIF
-- Check the Other tables here????
END IF;
END IF;
END;
END LOOP;
CLOSE cur_plan;
COMMIT;
END
Please take note that the values in the column tblToUpdate.UpdatedBy or tblToUpdate.CreatedBy could match either the UserName or the UserID of the table tblRef1, tblRef2, or tblRef3.
Kindly provide more insight. When I try to execute the procedure above, I get a DATA NOT FOUND ERROR.
Thanks.Ah, ok; I got the updates the wrong way round then.
BluShadow's single update sounds like what you need then.
I also suggest you read this AskTom link to help you see why you should choose to write DML statements before choosing to write cursor + loops.
In general, when you're being asked to update / insert / delete rows into a table or several tables, your first reaction should be: "Can I do this in SQL?" If you can, then putting it into a stored procedure is usually just a case of putting the sql statement inside the procedure header/footers - can't really get much more simple than that! *{;-) -
This is the message when I Open Firefox:
"You're not on the latest version of Firefox. Upgrade today to get the best of the Web!"
At <Help> & <About Firefox>, it shows
Firefox
9.0.1
"Firefox is up to date"
"You are currently on the release update Channel"
One of those messages must be wrong. Either way Firefox seems to work fine otherwise. Thanks and regards, Peter SpielmanIs your homepage set to www.google.com/firefox? If so, that page is wrong. You should change your home page to about:home or some other site instead. The google.com/firefox page is no longer supported.
-
One of three user accounts on the same computer appears to not be updating to 8.0.1 correctly. One admin and one none admin user account says it is up-to-date. The other non-admin user account, under Help About Firefox says apply update, but won't.
As long as you installed MS Office into its default location (the top level /Applications folder) it will be available to all user accounts on the Mac.
As far as licensing is concerned you only have to enter the license code once, which you should do right after installing MS Office, in the same admin account you installed it from, by opening any one of the MS Office applications. There is no additional licensing required for additional user accounts on the same Mac.
Each user account is able to run the Office apps. The only thing you will have to do is go through an initial setup screen in each user account (but this setup does NOT involve entering any additional license codes).
You may have problems if you installed MS Office in a particular user account (i.e. NOT in the top level /Applications folder). -
Hi all,
DB:11.2.0.3.0
EBS:12.1.3
O/S: Sun Solaris SPARC 64 bits
I am not able to view Forms Server version in Help: About Oracle Applications after the forms upgrade 10.1.2.3.0 after the forms upgrade 10.1.2.3.0 as per note:Upgrading OracleAS 10g Forms and Reports to 10.1.2.3 (437878.1)
Java/jre upgraded to 1.7.0.45 and JAR files regenerated(without force option). Able to opne forms without any issues.
A)
$ORACLE_HOME/bin/frmcmp help=y
FRM-91500: Unable to start/complete the build.
B)
$ORACLE_HOME/bin/rwrun ?|grep Release
Report Builder: Release 10.1.2.3.0 - Production on Thu Nov
28 14:20:45 2013
Is this an issue? Could anyone please share the fix if faced the similar issue earlier.
Thank You for your time
Regards,Hi Hussein,
You mean reboot the solaris server and then start database and applications services. We have two databases running on this solaris server.
DBWR Trace file shows:
Read of datafile '+ASMDG002/test1/datafile/system.823.828585081' (fno 1) header failed with ORA-01206
Rereading datafile 1 header failed with ORA-01206
V10 STYLE FILE HEADER:
Compatibility Vsn = 186646528=0xb200000
Db ID=0=0x0, Db Name='TEST1'
Activation ID=0=0x0
Control Seq=31739=0x7bfb, File size=230400=0x38400
File Number=1, Blksiz=8192, File Type=3 DATA
Tablespace #0 - SYSTEM rel_fn:1
Creation at scn: 0x0000.00000004 04/27/2000 23:14:44
Backup taken at scn: 0x0001.db8e5a1a 04/17/2010 04:16:14 thread:1
reset logs count:0x316351ab scn: 0x0938.0b32c3b1
prev reset logs count:0x31279a4c scn: 0x0938.08469022
recovered at 11/28/2013 19:43:22
status:0x2004 root dba:0x00c38235 chkpt cnt: 364108 ctl cnt:364107
begin-hot-backup file size: 230400
Checkpointed at scn: 0x0938.0cb9fe5a 11/28/2013 15:04:52
thread:1 rba:(0x132.49a43.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
Plugged readony: NO
Plugin scnscn: 0x0000.00000000
Plugin resetlogs scn/timescn: 0x0000.00000000 01/01/1988
00:00:00
Foreign creation scn/timescn: 0x0000.00000000 01/01/1988
00:00:00
Foreign checkpoint scn/timescn: 0x0000.00000000 01/01/1988
00:00:00
Online move state: 0
DDE rules only execution for: ORA 1110
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
Successfully dispatched
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK'
(SUCCESS, 0 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
ORA-01186: file 1 failed verification tests
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1:
'+ASMDG002/test1/datafile/system.823.828585081'
ORA-01206: file is not part of this database - wrong
database id
Thanks, -
How to Disable Check for updates button in Help/About in firefox 5.0
Hi the user should not manually check for updates so we want to disable the Check for updates button also in Help/About.
Thanks in advancedYou can hide that button with code in userChrome.css below the @namespace line.
* http://kb.mozillazine.org/userChrome.css
* http://kb.mozillazine.org/Editing_configuration
You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
* ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
<pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
#aboutDialog #updateBox { display:none!important; }</nowiki></pre>
You can also choose to lock the related update pref(s) to false if you want to make sure.
See:
* http://kb.mozillazine.org/Locking_preferences
* http://kb.mozillazine.org/about:config -
Help about W2K Apache plug-in for WLS
Hi,everybody.
I want to use the W2K apache http server for redirect the dynamic request to
WLS. But i don't have the corresponding plug-in. Who can help me? or Who can
give me some hint about this?
Thanks in advance.
BR
Steven ZhaoHi Steven,
as far as I know there is no Apache Plugin for Windows Platform. Your
choice is either Unix->Apache or Windows->IIS. I think there is a
Netscape Plugin as well, but I don't know for which platforms.
Daniel
-----Original Message-----
From: Steven Zhao [mailto:[email protected]]
Posted At: Friday, October 20, 2000 6:02 AM
Posted To: management
Conversation: Help about W2K Apache plug-in for WLS
Subject: Help about W2K Apache plug-in for WLS
Hi,everybody.
I want to use the W2K apache http server for redirect the dynamic
request to
WLS. But i don't have the corresponding plug-in. Who can help me? or Who
can
give me some hint about this?
Thanks in advance.
BR
Steven Zhao -
Need help about Hidden Markov Model model
I want to make classification for EEG signal using Hidden Markov Model
algorithm based on neural network.
plz need help about how to implement this algorithm using LABVIEW.
if not I want another thing to make classification.
any one know information about this topic, send me a reply
thanksHave you derrived the HMM that you want to implement?
If so, post the algorithm and we can provide comments on how to implement it using LabVIEW.
Message Edited by Ray.R on 04-12-2010 12:54 PM -
Help about location based classes
Helo. i need some help about location classes(i use J2ME). i want to develop a gps compass application. when i connected to gps, orientation is shown on a compass.(for example if i go to northeast direction, compass indicator shows the direction between nort and east).
I made connecting GPS. Now i must draw a compass and show the direction informations on it. For doing this, which location classes i can use?
(i do search about this,but i didn't decide which class i should use. I thought that i can use Orientation class for this. I found a source code and tried it. According to this snippet source code about orientation class, my phone doesn't support Orientation class.But i found an application about gps compass, it works on phone. )i write this question CLDC{MIDP part.
Thanks... -
i am enrolled in the beta channel but because the notification popups are so quick i someties do not see that a new beta ver is available. i consult filehippo regularly to see what updates are out there but i want to have a way i can find what beta i'm at - Help|About Firefox doesn't get it - how can i find that? looked in registry but haven't found what i want
any idees?
ciao
sawI'm not trying to discredit your work. But I did actually read the workaround and it is valid. That is true. But still that's not an answer to my question nor an explanation for that design choice. It's a workaround for a software not displaying the exact version.
So why not jump in this thread if it exists? Why create a new thread with the same question? Also to apply your logic, why didn't anybody tell the user to use the stable version if he's incapable of figuring out the obvious?
Maybe you are looking for
-
Cannot join time capsule airport network from iPad 2 or iPhone 4
I have recently setup a new time capsule airport base station network with my new iMac (27-inch, late 2012) running OSX 10.8.2. Wi-Fe network works fine for internet access and printing from the iMac but I cannot join the wi-fi network from our iPad
-
4TB Seagate Disk as a Local Storage Repo for OVM 3.2.4
I have a 4TB Seagate Disk Added to an Oracle VM Server running OVM 3.2.4 /dev/mapper/35000000000000001 3907017728 495547392 3411470336 13% /OVS/Repositories/0004fb0000030000196e5043753adcca It is around 4GB in size. I can import
-
N95 gps is weak but n95 8gb gps is good ?! :s
hi guys, iv got gamrin xt on both the 8gb and the normal n95. before i installed garmin, i used 2 b able 2 hook on2 gps sats with 'gps data' icon, or nokia maps. but with the original n95 it wont hook on to any gps sats at all, it found one or two bu
-
Why is the Pages paragraph styles list incomplete?
Dear Support Community, I created a new document and selected the 'Note Taking' template. The default document says 'Subject' in a line under 'Title'. The 'Subject' line is shown to have a paragraph style called 'Heading 3'. But when I click on the d
-
I'm trying to get NI to hold the LabVIEW Object-Oriented Programming System Design class in the Seattle area this fall/winter. So far, we have narrowed it down to the first half of December. But, we need a few more students to make it happen. If you