Join with conditions of outer join statement
HelloThe following was extracted from the 11 GR 2 document guide performance, which I am not quite understand.
Can anyone provide some examples to clearly explain this. Thank you
For join instructions examples with outer join conditions, the table with the outer join operator must come after the other table in the condition in the join order. The optimizer does not consider join orders that violate this rule. Similarly, when a subquery was transformed into an antijoin or a semi-join, arrays of the subquery must come after these tables in the outer query to which they were connected or block in correlation. However, semijoins and antijoins of hash are override this order condition in certain circumstances
Tags: Database
Similar Questions
-
Bluetooth, causing the blue screen with error message: out of State driver
Hello
I am posting this in the other thread here but it was closed before I could solve the problem.Background:I left on vacation for 4 weeks and I left my computer. When I came back, my computer was giving me the following problems:- Video playback of my SIN was rough and freezing - I fixed that by finding out one of the drives died on RAID-1
- After 30 minutes, the computer would give me a Blue Screen of Death (BSOD) and reboot - I have updated every driver I could, each piece of software, update the BIOS and then finally solved the problem by updating the firmware on my boot drive: a Crucial 128 GB SSD m4
These two problems have been resolved, but can be useful to understand the current problem
Current problem:After trying to use the webcam for video chat via Gtalk or Skype, my Bluetooth Logitech MX5500 keyboard and mouse stop responding. About 10-15 minutes after the call is completed, my computer gives a Blue Screen of Death with the message of STATE FAILURE of PILOT.The minidump file is available here, and I understand that the cause is due to my Bluetooth driver: http://dl.dropbox.com/u/30633232/052212-24429-01.dmpWhat I tried:- I've updated all the drivers available on the Asus site for my motherboard Asus P8P67 EVO, including Bluetooth and the BIOS driver
- I've updated my HD Audio integrated system with the drivers available on the Web from Realtek site
- I've updated all my drivers webcam and Logitech software
- I uninstalled, restart and reinstalled my Bluetooth drivers
- I have not matched and repaired my Logitech MX5500 keyboard and mouse
- I uninstalled, restart and reinstalled both Skype and Gtalk for Chrome, Firefox and Internet Explorer plugin
The ask:I'm out of ideas... would like to get the genius of someone on these boards help me please!The problem may be with the c:\windows\system32\drivers\sptd.sys:
******************************************************************************
* *
* Bugcheck analysis *.
* *
*******************************************************************************DRIVER_POWER_STATE_FAILURE (9f)
A driver is causing an inconsistent power state.
Arguments:
Arg1: 0000000000000003, a device object has been blocking an Irp for too long
Arg2: fffffa8009d73060, physical device from the stack object
Arg3: fffff80004c093d8, functional device object of the stack
Arg4: fffffa800e0c3190, blocked IRPDebugging information:
------------------DRVPOWERSTATE_SUBCODE: 3
Nom_image: usbhub.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 4d8c0c15
MODULE_NAME: usbhub
FAULTING_MODULE: fffff88008c06000 usbhub
CUSTOMER_CRASH_COUNT: 1
DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
BUGCHECK_STR: 0X9F
Nom_processus: System
CURRENT_IRQL: 2
STACK_TEXT:
"fffff800'04 c 09388 fffff800'03502702: 00000000' 00000000'00000003 fffffa80 ' 09 0000009f d 73060 fffff800 ' 04c093d8: nt! KeBugCheckEx
"fffff800 ' 04 c 09390 fffff800 ' 034a2e4c: fffff800 '04c094c0 fffff800' 04c094c0 00000000'00000000 00000000'00000003: nt! : FNODOBFM: 'chain' + 0 x 34050
"fffff800 ' 04 c 09430 fffff800 ' 034a2ce6: fffffa80 '06cdf5b0 00000000'01642618 00000000'00000000 fffffa80' 097aa901: nt! KiProcessTimerDpcTable + 0x6c
fffff800 '04c094a0 fffff800' 034a2bce: 0000034f 'c591e29e fffff800' 04c09b18 00000000'01642618 fffff800'0360 d 588: nt! KiProcessExpiredTimerList + 0xc6
"fffff800 '04c09af0 fffff800' 034a29b7: 0000011a ' 68920ac3 ' 01642618 0000011 0000011a has ' 68920 has 32 00000000'00000018: nt! KiTimerExpiration + 0x1be
fffff800 '04c09b90 fffff800' 0348feca: fffff800 '0360ae80 fffff800' 03618cc0 00000000'00000002 fffff880' 00000000: nt! KiRetireDpcList + 0 x 277
fffff800'04c09c40 00000000' 00000000: fffff800 ' 04c0a000 fffff800'04 c 04000 fffff800 ' 04c09c00 00000000' 00000000: nt! KiIdleLoop + 0x5aSTACK_COMMAND: kb
FOLLOWUP_NAME: MachineOwner
FAILURE_BUCKET_ID: X64_0x9F_3_btfilter_IMAGE_usbhub.sys
BUCKET_ID: X64_0x9F_3_btfilter_IMAGE_usbhub.sys
Follow-up: MachineOwner
---------0: kd >! devobj fffffa8009d73060
Object Device (fffffa8009d73060) is:
Can not read information from nt shift! ObpInfoMaskToOffset
\Driver\usbhub DriverObject fffffa80094ffa50
Current PRI 00000000 RefCount 2 Type 00000022 Flags 00003040
DevExt fffffa8009d731b0 DevObjExt fffffa8009d73bb0 DevNode fffffa8009d7b550
ExtensionFlags (0 x 00000800)
Unknown flags 0 x 00000800
AttachedDevice (top) fffffa8009663880 * WARNING: unable to verify timestamp for c:\windows\system32\drivers\sptd.sys
ERROR: Module load completed but symbols can be loaded for c:\windows\system32\drivers\sptd.sys
\Driver\ACPI
Queue is not busy.I would say to uninstall the application that has installed the driver c:\windows\system32\drivers\sptd.sys, maybe it is Daemon Tools or Alcohol 120%.
Then, uninstall the c:\windows\system32\drivers\sptd.sys - see "How can I remove driver SPTD on 64-bit operating system?" in the following link:
http://www.duplexsecure.com/en/FAQ
Similar question in the following thread:
-
ASUS Zenbook UX32A BSOD with pilot error, out of State
Original title: ASUS Zenbook UX32A driver power state failure
Hello
I hope that someone (anyone!) can help you. I experienced the dreaded blue screen of death about 2 weeks ago, now the computer simply refuses to open 'sleep' mode and is very slow when to start full is needed. I've updated the drivers (for as much as I can) and updated the laptop as well. Nothing has solved the problem. Help :-)
The last referenced error iastora.sys (Intel storage driver):
BUCKET_ID: 0x9F_3_POWER_DOWN_IMAGE_iaStorA.sys
However, there may be a conflict between the iastora.sys and the excsd.sys (driver ExpressCacahe):
KD >! devstack fffffa8004415060
! DevObj! DrvObj! DevExt ObjectName
fffffa80066dcb10 \Driver\partmgr fffffa80066dcc60
fffffa80059fc880 * ERROR: Module load completed but symbols could not be loaded for excsd.sys
\Driver\excsd fffffa80059fc9d0 excsd0
fffffa80066dc060 \Driver\disk fffffa80066dc1b0 DR0
\Driver\ACPI fffffa8004342590 fffffa80044165b0
> fffffa8004415060 \Driver\iaStorA fffffa80044151b0 00000040
! DevNode fffffa80044158e0:
DeviceInst is 'SCSI\Disk & Ven_ATA & Prod_Hitachi_HTS54505\4 & 238af970 & 0 & 000000'
ServiceName is "disk".What I might suggest is to uninstall ExpressCache, then update the Intel storage driver, then reinstall ExpressCache.
There should be versions updated to ExpressCache and the Intel storage driver in the following link:
http://support.ASUS.com/download.aspx?SLanguage=en&m=UX32A&p=3&s=411
ExpressCache is no software required, so if you uninstall ExpressCache you can leave it uninstalled, if you wish.
-
Hi all
Is there a possible way to cross the join with condition?
I want something like this:
Table A: custid, accu_id, sum
CustID, accu_id unique =
CustomerID amount accu_id
10 25 400
10 35 447
10 29 420
20 30 510
30 35 472
.
.
.
Table b: accu_id, description
accu_id description
shoes 25
Book 29
30 computer
pen 35
Note: in table A, it is a mismatch of the accu_id values that do not use. Please, take into account this.
I want to see all the columns in the TABLE B for each custid in A. TABLE (something like cross join but with ONE article.) The following query does not work.
Select * from a right join B on A.accu_id = B.accu_id;
10-25
10-29
10-30
10-35
20-25
20-29
20-30
20-35
30 25
30 29
30 30
30-35
What should I do for this?
Thanks in advance
Use partition outer join:
with a (too)
Select double union all 10 custid, accu_id 25, amount 400
Select 10,35,447 from all the double union
Select 10,29,420 from all the double union
Select 20,30,510 from all the double union
Select double 30,35,472
),
b like)
Select accu_id 25, "shoe" description of all the double union
Select 29, 'book' from dual union all
Select 30, 'computer' from dual union all
Select 35, 'pen' from dual
)
Select a.custid,
a.accu_id,
a.amount,
b.
a
by (a.custid) partition
right join
b
On a.accu_id = b.accu_id
order of a.custid,
a.accu_id
/
AMOUNT ACCU_ID CUSTID DESCRIPT
---------- ---------- ---------- --------
10 25 400 shoe
10 29 420 book
10 35 447 pen
10 computer
20 30 510 computer
shoe 20
book 20
20 pen
30 35 472 pen
30 shoe
30 bookAMOUNT ACCU_ID CUSTID DESCRIPT
---------- ---------- ---------- --------
30 computer12 selected lines.
SQL >
SY.
-
Update query with join statement
Hi guys, would check how to write a query to update with the inner join statement? The case is like this, I need to update PRD_ID on TBL A as below, based on the information of lookup table. The keys are based on the A03 column to the table time to condition only select records in LOOKUP_TBL where PRD_ID = 110001 then update to TBL_A for those who match the data and FIX_FLT = 1
I have an update query and it works in SQL SERVER but not in ORACLE
Update a PRD_ID = B.PRD_ID set
Inner TBL_A A join B LOOKUP_TBL
On A.A03 = B.A03
AND A.FIX_FLT = 1 AND B.PRD_ID = '110001';
TBL_A
PRD_ID A03 FIX_FLT TXN DATE 1 A1 1 1 23/10/2010 1 A2 1 1 10/24/2010 1 A3 3 2 10/25/2010 1 A4 3 2 10/26/2010 1 A5 3 1 27/10/2010 LOOKUP_TBL
PRD_ID A03 NOTE 110001 A1 NULL VALUE 110001 A2 NULL VALUE 110005 A3 NULL VALUE 110005 A4 NULL VALUE 110001 A5 NULL VALUE You can write updates like this in Oracle. It's called updatable join views. Something like this:
Update
(select a.prd_id a_prd_id
b.prd_id b_prd_id
Inner TBL_A A join B LOOKUP_TBL
On A.A03 = B.A03
AND A.FIX_FLT = 1 AND B.PRD_ID = '110001'
)
Set a_prd_id = b_prd_id;But you must have the constraints appropriate in place, otherwise you will get the error "key preserved table.
-
Hi all
I need assistance with SQL FULL OUTER JOIN.
How to write with FULL OUTER JOIN, the query.
I tried like
I have 3 different queries.
Query q: SELECT emp_id LN.emp_id.
Sum (LN_amount) loan_amt
MY_LON_TAB LN
WHERE LN_amount > 20000
LN.emp_id GROUP;
Query b: SELECT PLN. EMP_ID emp_id,
Sum (PLAN_AMOUNT) plan_amt
FROM PLN MY_PLAN_TAB
where PLAN_AMOUNT <>0
GROUP BY PLN. EMP_ID;
Query C:
SELECT FLX. EMP_ID emp_id,
SUM (PRORATE_AMOUNT) PRORATE_AMT
OF MY_FLX_TAB FLX
WHERE PRORATE_AMOUNT <>0
FLX GROUP. EMP_ID;
Suppose that the different subquery above 3 a, b, c respectively. each subquery with emp_id and respective amount.
like a.emp_id, a.loan_amt
b.emp_id, b.plan_amt
c.emp_id, c.prorate_amt
I show all the empid with their amount respective.
schenario: If an account made, but not vice-versa b
and B have record, but not vice versa c
and a credit record but not vice versa c
first: I have external is associated with the A and B
Second: join external then complete the total outcome of (a & b) with c
but empid c just as empty.
My output is:
emp_id a.loan_amt, b.plan_amt c.prorate_amt
101 5000 null null
102 4500 null 2000
103 6700 null null
How to solve the foregoing to the ANSI (FULL OUTER JOIN) method.
Please suggest me.
Thanks in advance...
PKMHello
It is very difficult for anyone to say what you're doing wrong if they do not know what you are doing. Post your code FULL OUTER JOIN.
My best guess is:WITH a AS ( SELECT ... -- What you posted as query a ) , b AS ( SELECT ... -- What you posted as query b ) , c AS ( SELECT ... -- What you posted as query c ) SELECT COALESCE ( a.emp_id , b.emp_id , c.emp_id ) AS emp_id , ... -- whatever other columns you want FROM a FULL OUTER JOIN b ON b.emp_id = a.emp_id FULL OUTER JOIN c ON c.emp_id = COALESCE (a.emp_id, b.emp_id) ;
I hope that answers your question.
If not, post a small example (CREATE TABLE and INSERT statements) data for all tables and the results expected from these data (if not what you have already posted). -
Hello
I need to generate a summary table with conditions. Here are the details:
create the table tb_class (classId number (5), studentNum number (5));
create table tb_grade (classId number (5), gradeNum number (5)):
insert into table values tb_class (101, 100);
insert into table values (201, 102) tb_class;
insert into table values (102, 103) tb_class;
insert into table values tb_grade (101, 1);
insert into table values (102, 1) tb_grade;
insert into table values (201, 2) tb_gradfe;
I would like to get the total number of students registed in a specific shade with a SQL, the result is expected as follows:
GradeNum studentNumRegistered studentNumNonRegisted
1 203 102
2 102 203
Is that what you are looking for?
WITH subsum AS (SELECT tb_grade.gradenum, SUM(tb_class.studentnum) AS students FROM tb_class JOIN tb_grade ON tb_grade.classid = tb_class.classid GROUP BY tb_grade.gradenum) SELECT subsum.gradenum, SUM(subsum.students) AS studentnumregistered, SUM(subsum1.students) AS studentnumnonregistered FROM subsum JOIN subsum subsum1 ON subsum1.gradenum != subsum.gradenum GROUP BY subsum.gradenum;
-
XMLTable to extract columns with conditional path does not
Hello
I am on 11.2.0.3 and I need to extract columns on a section of XML with conditions on, but I get "ORA-00907: lack the right parenthesis", so I think that the way I go about it is not supported or that I have somehow the wrong syntax or something.
This is a very simplified what I'm trying to do (there could be several different entries in the < sets1 > and < sets2 > sections and they might be in different orders, is not as if I can always choose the first or the last):
with sample_data as (select 1 id, xmltype('<root> <sets1> <set1><set_name>name1</set_name><set_val>val1</set_val></set1> <set1><set_name>name2</set_name><set_val>val2</set_val></set1> </sets1> <sets2> <set2><set_name>name3</set_name><set_val>val3</set_val></set2> <set2><set_name>name4</set_name><set_val>val4</set_val></set2> </sets2> </root>') xml_doc from dual) select * from sample_data sd, xmltable('<root>' passing sd.xml_doc columns col1 varchar2(10) path 'sets1/set1[set_name=''name1'']/set_val', col2 varchar2(10) path 'sets1/set1[set_name=''name2'']/set_val', col3 varchar2(10) path 'sets2/set2[set_name=''name4'']/set_val') x;
What I'm trying to get:
COL1 COL2 COL3 ---- ---- ---- val1 val2 val4
I know that I could separate the < set1 > and < set2 > nodes in their own xmltypes xmltable on it and then join them and make the necessary pivoting, etc., but when I try to start that against only 1000 lines, db do not love and ended my session! Therefore, I'm looking for a more elegant way to do it.
Is there a way to do this in a XMLTABLE? Pointers are very welcome!
It solves your problem of sample request and you get the output that show you.
with sample_data as (select 1 id, xmltype('
name1 val1 name2 val2 name3 val3 name4 val4 As you can see, I've marked the lines that I've changed. The error you saw came to use two single quotes in the COLUMN XPath instead to use double quotes. Then I changed the XPath expression in the XMLTable brackets as well.
I'm confused on what the columns you really want overall, in terms of how you know which values you want, or did you mean that you want something random sets1 and sets2.
You store the XML file in a column of XMLType SECUREFILE BINARY, right? It seems that you made previous visits, but just double check.
-
Battery drains when out of State
I was very happy with my Razr M. I travel a bit and have noticed that the battery runs out in less than 6 hours and the phone is hotter than normal when I'm out of State.
I don't have this problem when I'm at my home port. The lowest level of the battery I saw after 12 hours is about 40%.
This could be the cause this excess heat and the low battery life? Thanks in advance.
You can get your real signal strength by going to settings > about phone > status > network type and resistance. This will give you the strength of your signal. The more the worst strength. Remember that it will be negative numbers, so-72 is greater than-85.
On my phone, /-105-100 is average for the 4 G and-72 /-86 is an average of 3 G. Your signal may or may not be the same as mine. Everything depends on your location and the proximity of the Verizon Tower and the amount of energy that the tower is designed to push. There are a ton of different variables that will change your signal strength. I hope this helps.
-
Tip action CP5 need help with conditions...
Hello
I created my own multiple question (MC) with 4 theeorie response which 3 are fair and 1 is wrong.
As soon as a true/false response is checked, a tip action is performed - check mark in the box as shown and "feedback" to answer.
In the case of a good answer - any previous response feedback is hidden, but the check box answers correct stay while evil answer checkmark is hidden.
An example of the tip action for one of the three answers:
This is what looks like the question until the answer to my question must be implemented:
Now to my question:
At the end of the responses, I would like to the user get a message: CONGRATULATIONS...
This should appear when all 3 answers have been selected.
After CONGRAT... message, they can then click on continue button to continue training.
I'm curious to any suggestion on how to achieve this
Thanks in advance for the answer.
Best regards
Stephanie
OPTION A:
The measures to achieve the congratulations message on the same Blade (which is the issue) 1. Actions such as B_Selected, C_Selected etc must be conditional actions instead of the standard actions, that they are at the moment.
2. four variables must be created in project-> Variables-> add new. These can be called a, b, c, d and a value of 0 (zero), which means that the option is not selected 3. In the conditional action B_selected first requirement should be something like
If (1 corresponds to 1)
{
See the TC_Correct_B
See the Image_230
Hide Image_233
Hide TC_Wrong_A
Hide TC_Correct_C
Hide TC_Correct_D
Assign b = 1
}
4. in the second step of the action itself i.e. B_selected, follow these steps
If (a is 0 & b is equal to 1 & c equals 1 & d is equal to 1)
See the TC_Congratulations
All actions should have these two conditions and if there are actions such as B_unselect, then 'assign b = 0' in such actions.
OPTION B
On the other hand, if it is showing the message of congratulations on the next slide, it will be simpler as this 1. Create four variables a, b, c, and d = 0 2. In actions such as B_Selected (no need to change to conditional action), add a statement 'assign b = 1'.
3. in the actions such as B_unselected, add a statement 'assign b = 0'.
4. at the exit of the slide execute advanced action, which will be a conditional action as follows:
If (a is 0 & b is equal to 1 & c equals 1 & d is equal to 1)
Go to the next slide
On the other
Jump to slide _
5. on the next slide write the message of congratulations.
Kind regards
Vautrin
-
With Photos being out why keep the iPhoto library
With Photos being out why keep the iPhoto library.
Because you can use it.
Because you might not be sure that you want to use pictures.
A safety net.
-
Open and Open with are grayed out
I don't have much experience with the bridge, but I recently started to use it to drag the photos in an InDesign file.
Well, somehow I messed up the options in Bridge. On the right side of my screen, I released in PDF or Web Gallery. I have no idea what I clicked to get there, no more than I can understand how close this part of the screen. On the left side, I have a file list, which contains pictures for my identification project. However, when I click on file, open and open with are grayed out.
I just want to go the bridge he had before. Can you please help? Thank you!
You probably clicked the workspace of OUTPUT at the top right
Click the windows workspace or goto Essentials > Workspace and choose the one you want (probably the workspace Essentials)
-
Where to write the condition in the design of workflows with conditional step?
HelloAgain, I wish BP and workflow with contitional design stage.
I had designed BP and workflow.
As directed by the user for Udesigner guide, I had added trigger before the condition step.
But I do not understand where to set the Condition to test?
If I need to write the condition in triggering elemt itsel... How to proceed?
for example, I want to write the condition as cost of Tota > = 100000, it must follow a path and if fails to another path.
The conditions of triggers are specified in the workflow settings. After you have created a new configuration, open it and click on the settings tab. You will see a tree structure of the workflow with conditional branches. Click a conditional branch to set the parameters for the trigger for this route condition.
-
Reactive layouts: publish multiple Sites with conditional Builds and which connect
I hope that someone can provide a simple solution to publish problems I've had with adapted presentations when you try to publish several sites with conditional builds. Essentially, I want to be able to have an index page that links to one of the two variants of the published sites that I called 'General' and 'specific '. When I click on the 'general' link I want to not open the site which was published with a conditional for all these subjects compilation labeled as 'general' and when I click on the 'link' want it to open the site which was published using a conditional version for 'specific '.
Here are the steps I took to create sites and can't seem to get to bind correctly:
Table of contents, topic Creation and tagging content
- Creates a Table of contents.
- Added 2 topics in the Table of contents. The first topic, I called "general" and the second issue I called, 'specific '.
- I then click with the right button on the "general" and selected subject Tag to build conditional apply. From there, I've created a new tag called "General".
- I repeated this process to create the specific tag, but do a right-click on the 'specific' theme and the creation of a new tag called "specific".
Layouts reactive and edited the sites based on the conditional tags
- Created sensitive presentation using the standard layout and content generated without any conditional builds.
- Duplicated sensitive put in page and gave him the content of 'general' then it is generated using the conditional, "General" version If the finished publication published content has shown that the 'general' subject, as expected.
- I then repeated the same process for the specific content and content using the version parole, generated 'specific '. When over content published showed that the subject marked as 'specific' as expected.
Added an Index page to the table of contents
- Created a new topic to serve as the launch page.
- Added a 'general' hyperlink called for the launch of the general "theme found in the general publishes from the resource manager.
- Added a hyperlink called 'specific' to the launch of the general "theme found in the specific issues from the resource manager.
- I then republish the sensitive standard layout site.
From this point, it gets stuck and won't open properly published Web sites. I don't know why it won't launch hyperlinks correctly. Is there something I'm missing? Let me know if you do not want to see my files. I will be gladly their.
OK, thanks a lot for the capture screen. They help more than you realize.
So here's one of the biggest mistakes I think that you have done so far. You use the resource manager to link to published results. If it is technically possible to do, I'm pretty sure Adobe never planned for it to be used this way.
It may help to think in terms of creation of food products. I have long considered as RoboHelp to be very much like working in my kitchen. All consumables (heading text in the headings, images, HTML pages, etc.) are just as raw ingredients. (Eggs, milk, flour, etc.). The places of storage (hard drive) it's like the pantry and the fridge. And RoboHelp provides facilities to easily combine ingredients to create the different recipes.
This next bit will be somewhat exaggerated, but bear with me. Maybe you have one or more neighbors and all you want to share some common "ingredients". If you set the things where each of you have access to a wine cellar and a shared refrigerator. Maybe you do a Dutch sauce killer. You create it and place in the refrigerator, then your other participants have access through the common "fridge". This is exactly what the resource manager is intended to help.
Now assume that you create something like cookies chocolate chip and you keep in the refrigerator. Well, that's fine, but you don't want to use cookies to chocolate chip already baked in a recipe that might call for cookie dough. But that's what happens when you take an exit and place in a place intended for raw ingredients. And you will see the strange behavior. Prepare for these cookies chemically changes them so that cookies already are significantly different from the dough used to create them. Similarly, you don't want to take one or more output files and reuse in a project source.
So in your case, you run an index file and that fires events to produce the output. All should be well. But when you click on the links to open topics, topics are intended to show up more in the right panel. Think of the picture of how works of image on a TV. The moment that link you to something intended to fill the screen, he is forced into this smaller area on the right. If you end up with what you see in the last picture.
I suggest the following steps.
First, REMOVE your resource manager exits.
REMOVE all links that can point here.
Output records where people will consume copy your projects. (The web server)
Then figure either the parent (.. /.. / somefolder/somefile.htm) path to other systems or the absolute path (http://www.whatever.com) and to link the projects in this way.
Sorry, but without seeing the installation of first hand, it is difficult to say what should be these paths.
I hope this was helpful... Rick
-
How to avoid duplicates on a column with condition
Hi all
I need some advice here. At work, we have an Oracle APEX application that allow the user to add new records with the decision of the increment automatic number based on the year and the group name.
Said that if they add the first record, group name AA, for 2012, they get the decision number AA 1 2013 as their record casein displayed page of the report.
The second record of AA in 2013 will be AA 2 2013.
If we add about 20 records, it will be AA 20 2013.
The first record for 2014 will be AA 1 2014.
However, recently, we get a claim of the user on two files of the same name of group have the same number of the decision.
When I looked in the history table and find that the time gap between 2 record is about 0.1 seconds.
In addition, we have the correspondence table which allows the user admin update the sequence number start with the restraint that it must be greater than the maximum number of the current name of the current year.
This boot sequence number and the name of the group is stored together in a table.
And in some other case, the user can add a decision duplicate for related record number. (this is a new feature)
The current logic of the procedure to add the new record on the application are
_Get max record table with selected group name (decision_number) and the current year.
_INSERT in the folder table the new record came with the decision to number + 1
_ update sequence number of the number of the decision just added.
So instead of utitlising the process of editing the built-in automatic table of the APEX, I write a procedure that combine all three processes.
I have run some loop for continually perform this procedure, and it seems that it can generate autotically new decision unique number with time about 0.1 second difference.
However, when I increase the number of entry to 200 and let two users run 100 each.
If the time gap is about 0.01 second, double decision numbers are displayed.
What can I do to prevent duplicate?
I can't just apply a unique constraint here for three columns with condition because it can be duplicated in some special conditions. I don't know much about the use of lock and its impact.
This is the content of my procedure
create or replace
PROCEDURE add_new_case)
-ID just use the trigger
p_case_title IN varchar2,
p_year IN varchar2,
p_group_name IN VARCHAR2,
-decisionnumber here
p_case_file_number IN VARCHAR2,
-active
p_user in VARCHAR2
)
AS
NUMBER default_value;
caseCount NUMBER;
seqNumber NUMBER;
previousDecisionNumber NUMBER;
BEGIN
-execution immediate q '[alter session set nls_date_format = "dd/mm/yyyy"]';
SELECT count (*)
IN caseCount
OF CASE_RECORD
WHERE GROUP_ABBR = p_group_name
AND to_number (to_char (create_date, "yyyy")) = to_number (to_char (date_utils.get_current_date, "yyyy"));
SELECT max (decision_number)
IN previousDecisionNumber
OF CASE_RECORD
WHERE GROUP_ABBR = p_group_name
AND to_number (to_char (create_date, "yyyy")) = to_number (to_char (date_utils.get_current_date, "yyyy"));
IF p_group_name IS NULL
THEN seqNumber: = 0;
ON THE OTHER
SELECT Seq_number INTO seqNumber FROM GROUP_LOOKUP WHERE ABBREVIATION = p_group_name;
END IF;
IF caseCount > 0 THEN
default_value: largest = (seqNumber, previousdecisionnumber) + 1;
ON THE OTHER
default_value: = 1;
END IF;
INSERT INTO CASE_RECORD (case_title, decision_year, GROUP_ABBR, decision_number, case_file_number, active_yn, created_by, create_date)
VALUES (p_case_title, p_year, p_group_name, default_value, p_case_file_number, 'Y', p_user, sysdate);
-Need to update the sequence here also
UPDATE GROUP_LOOKUP
SET SEQ_NUMBER = default_value
WHERE the ABBREVIATION = p_group_name;
COMMIT;
EXCEPTION
WHILE OTHERS THEN
Logger.Error (p_message_text = > SQLERRM)
, p_message_code = > SQLCODE
, p_stack_trace = > dbms_utility.format_error_backtrace
);
LIFT;
END;
Many thanks in advance,
Ann
It's easier to solve for the case, while p_group_name is not null. In this case, you update a GROUP_LOOKUP line, so that you can select to update this line at the beginning, to prevent cases of two for the same group added at the same time. To do this, change the selection of GROUP_LOOKUP to:
SELECT Seq_number INTO seqNumber FROM GROUP_LOOKUP WHERE ABBREVIATION = p_group_name for an updated VERSION OF the SEQ_NUMBER;
and move this to be the first thing that did the procedure - before it has CASE_RECORD lines.
In the case when p_group_name is set to null, you have some object to be locked. I think the best you can do is to lock the entire table GROUP_LOOKUP:
the table lock in exclusive mode GROUP_LOOKUP wait 100;
The '100 expectation' means that he will wait until 100 seconds before giving up and trigger an error. in practice, that is expected to only wait a moment.
Exclusive mode allows others to read, but not to update the table.
UPDATES and the LOCK of the TABLE will be updates of other sessions wait for this transaction to validate. Queries from other sessions are not affected.
The locks are released when you commit or roll back.
Maybe you are looking for
-
Norton Antivirus slows down startup time in Windows Vista
Hello need help please, I am led to madness by starting slow time of my laptop.I he had only a few weeks and don't use it for anything beyond to produce documents word etc. It has been gradually slower on boot and I suspect it has something to do wit
-
How can I get a copy of replacement of Rise of Nations?
Still, I have the box and all other information for example CD keys etc, is it possible to download the Lady so I can enter my CD key? original title: I lost my climb of the disc of the United Nations.
-
Cannot access control panel or Windows updates and not more sound
Yesterday, I restarted my computer and a message keeps popping up that I am victim of software counterfeiting (in reference to Microsoft Windows) when I bought the computer at Future Shop just a year ago. Also, now there is a red X on the speaker ico
-
Computer BSOD'd 2 x today. The event log States: The computer was restarted after a bugcheck. The bugcheck was: 0x00000001 (0 x 0000000000000000, 0 0000000000000001, 0x00000000742d2e09, 0xfffff8800aa00b60). LEAPC_INDEX_MISMATCHERREUR (1)This is an i
-
Hello!! New to this site and Blackberry, just recently bought my first Blackberry Q10 with a provision on the qwerty keyboard, as I live in northern Sweden. However as BIS is not necessary for the Q10, I use a regular provider with 3-4 G connection,