Results 1 to 3 of 3

Thread: Sql qyery

  1. #1
    Join Date
    Jan 2005
    Posts
    362

    Unanswered: Sql qyery

    I have a table with employees and a view with some informations for them.
    I want to find the employees that have
    Code:
    select (emp.dosivalue+emp.dosi2value +emp.dosi3value+)*2 
     from emp
    the same as
    Code:
    select  sum(nvl(empv.posovalue,0)) from empv group by emp_id,per_id
    The emp_id is the primary key of emp (employees).
    How I may do that?
    I want that at oracle reports.
    Dimis

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Just an idea; see if you can do something with it:
    Code:
    select x.ename
    from (select ename, (val + val2 + val3) val_t
          from emp
         ) x,
         (select ename, sum(val) val_v
          from emp_v
          group by ename
         ) y
    where x.ename = y.ename
      and x.val_t = val_V;

  3. #3
    Join Date
    Jan 2005
    Posts
    362

    Query

    I change this query and I thing it works.
    Thank you
    Dimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •