It depends on the context parameters .
But normally the order is --->
Merge < Update < delete < insert <select ,when Record count is same for all .
User Profile
Collapse
-
When any packaged function is accessed thru SQL select statement , then Purity level of the function may not be ensured .
But there is a way to avoid this shortcoming -> Pragma RESTRICT_REFERE NCE .Leave a comment:
-
On delete cascade option works on Parent -> child Record deletion . But here I think the reqmt. is opposite .
So u may go for a After Update for each row Trigger of delete statement on table Bill_Detail and delete with Comp_id = :old.comp_id condn.Leave a comment:
-
Your purpose can be solved w/o going for a trigger in the following way ---->
Create Or Replace Procedure Ins_A(v_type in Varchar2) is
Begin
Insert into A(id)
Select B.id from B where Upper(Trim(B.ty pe)) = Upper(Trim(v_ty pe)) ;
Exception when others then
rollback;
End ;Leave a comment:
-
Hi , u may try Sonic2k6 query or if U want not to use Union for performance issue, U may use this ----->
SELECT A.AMOUNT , B.PLANID ,B.EVENTCD
FROM ACCUMULATON A, PLAN B
WHERE A.PLANID = B.PLANID
AND B.DEALERID = 1
AND( (A.OFFERING = B.OFFERING AND aFlag = 1) OR(1=1)) ;Leave a comment:
-
U can try this one ----->
select * from (select distinct val from suvam order by val)
where rownum < 6
Minus
select * from (select distinct val from suvam order by val)
where rownum < 5 ;Leave a comment:
-
Oracle server can make Parallel operation for better performance .
Which of the those operation(s) can be made parallely by Oracle ?Leave a comment:
-
If u don't go for creating a Temp table then try this SQL to directly fetch the resulset in ur format -------->
Select Name, EmployeeID, Year ,
Substr(a.Column _name,1,3) Month,
Sum(Decode(a.Co lumn_name ,'JANEXP',b.Jan Exp,'FEBEXP',b. FebExp,'MAREXP' ,b.MarExp,0)) Exp ,
Sum(Decode(a.Co lumn_name,'JANH RS',b.JanHrs,'F EBHRS',b.FebHrs ,'MARHRS',b.Mar Hrs,0)) Hours ,
From All_Tab_Columns a ,Employee b
Where a.Table_Name...Leave a comment:
-
Actually , I need to know the pattern of a column(Say Number type).
Say , table T1 has a field F1 Number(6,2) .
if F1 = 123.25 then the pattern will be 999.99 . Is there any SQL function which can evaluate this ?Leave a comment:
-
Can u please write down the exact query ?
Or U can do it yourself by identifying the driving table and where it is involved .Leave a comment:
-
Parallel Operation
Which of the following operation(s) Oracle server make parallel ?
1.Insert
2.Delete
3.Update
4.Join
5.Sort -
Idx on Nested table
Can nybody tell me whether index can be created on the columns of a nested table or not ? -
Can u mention what is the actual error coming during compilation ?Leave a comment:
-
Pls refer to ur original code with Trigger "suj_range_chec k" .
In the body remove the Else part as it will automatically execute if the trigger does not raise Raise_Applicati on_Error .
Rest of the things r OK .Leave a comment:
-
See, if 2 foreign keys exist on 1 column(say the scenario is ,T1 is master,T2 and T3 are having foreign key) , then No referencial integrity constraints would be violated for the other one .
Because , if u insert child record in T2 and T1 is already having that record , then one condition is fulfilled . But the record inserted in T2 is in no way related to T3 .So T1 may have that record , but T3 may not have . So no constraint violation ....Leave a comment:
-
Oracle Function
Can nybody tell me how this works ?
select CHARACTERS(trim (CAST(upc as VARCHAR(20)))) from T1 ;
Here UPC may be a Number or a Varchar type column of T1 table .
Say , Upc = 1256.23 then what is the O/p ??
Again , say Upc = 'Skij' then what is the O/p ?? -
in that case u have to etch that value through that link from TRNCHILD table into a local variable and then use that variable in place of :NEW.Valc .Leave a comment:
-
U can try as ------
Select f1,f2 ,f3 from T1 a
group by a.* ;Leave a comment:
-
U can try with it -----------
Select field1,field2 into v1,v2 from t1 ;Leave a comment:
-
u can try with this one ------
Select * from employee where emp_no = (
Select emp_no from (Select * from employee order by sal desc) where rownum < n+1
Minus
Select emp_no from (Select * from employee order by sal desc) where rownum < n
) ;
Enter n = 3 ;Leave a comment:
No activity results to display
Show More
Leave a comment: