User Profile

Collapse

Profile Sidebar

Collapse
suvam
suvam
Last Activity: Jan 3 '07, 09:05 AM
Joined: Nov 30 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • suvam
    replied to trickey sql query
    It depends on the context parameters .
    But normally the order is --->

    Merge < Update < delete < insert <select ,when Record count is same for all .
    See more | Go to post

    Leave a comment:


  • suvam
    replied to package disadvantage
    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 .
    See more | Go to post

    Leave a comment:


  • suvam
    replied to Problem in deleteing record based
    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.
    See more | Go to post

    Leave a comment:


  • suvam
    replied to Trigger- before insert
    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 ;
    See more | Go to post

    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)) ;
    See more | Go to post

    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 ;
    See more | Go to post

    Leave a comment:


  • suvam
    replied to Parallel Operation
    Oracle server can make Parallel operation for better performance .
    Which of the those operation(s) can be made parallely by Oracle ?
    See more | Go to post

    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...
    See more | Go to post

    Leave a comment:


  • suvam
    replied to Oracle Function
    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 ?
    See more | Go to post

    Leave a comment:


  • suvam
    replied to INNER JOIN vs Sub-Query (with where clause)
    Can u please write down the exact query ?
    Or U can do it yourself by identifying the driving table and where it is involved .
    See more | Go to post

    Leave a comment:


  • suvam
    started a topic Parallel Operation

    Parallel Operation

    Which of the following operation(s) Oracle server make parallel ?

    1.Insert
    2.Delete
    3.Update
    4.Join
    5.Sort
    See more | Go to post

  • suvam
    started a topic Idx on Nested table

    Idx on Nested table

    Can nybody tell me whether index can be created on the columns of a nested table or not ?
    See more | Go to post

  • suvam
    replied to please find out mistake.
    Can u mention what is the actual error coming during compilation ?
    See more | Go to post

    Leave a comment:


  • suvam
    replied to find mistake... Trigger
    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 .
    See more | Go to post

    Leave a comment:


  • suvam
    replied to 2 Foreign Keys on 1 column
    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 ....
    See more | Go to post

    Leave a comment:


  • suvam
    started a topic Oracle Function

    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 ??
    See more | Go to post

  • suvam
    replied to Trigger - Data from Multiple table
    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 .
    See more | Go to post

    Leave a comment:


  • U can try as ------

    Select f1,f2 ,f3 from T1 a
    group by a.* ;
    See more | Go to post

    Leave a comment:


  • U can try with it -----------
    Select field1,field2 into v1,v2 from t1 ;
    See more | Go to post

    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 ;
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...