Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by darlet

  1. darlet

    Dividing field values for the average

    Thank you Dieter, it works!!!!! D.
  2. darlet

    Dividing field values for the average

    Thanks PHV. It works. I guess that if iI have also a C column and I desire to get a D column as C/AVG(C) I should query select A , A / (select avg(A) from (Select .....) CALC) as B , C / (select avg(C) from (Select .....) CALC) as D from (Select .....) CALC Probably creating...
  3. darlet

    Dividing field values for the average

    Well...just a little bit further... :) The CALC table I was talking about is actually the result of a quite complex query. I've just tried this: select A , A / (select avg(A) from CALC) as B from (Select .....) CALC Oracle highlights the CALC in (select avg(A) from CALC) and tells...
  4. darlet

    Dividing field values for the average

    Thanks rudy..that's exactly what I wanted.
  5. darlet

    Dividing field values for the average

    Well I just checked with access, select A, avg(A) as B from CALC group by A A MedA 1 1 4 4 5 5 34 34 53 53 99 99 doesn't seem to work.... When i group by A then AVG(A) = A ....
  6. darlet

    Dividing field values for the average

    Hi rudy...thanks for your tip... if I have also a C column and I desire to get a D column as C/AVG(C) I should query select A,(A/avg(A)) as B, C, (C/avg(C)) as D group by A,C ??? I don't have Oracle at home...just my curiosity till monday morning! :)
  7. darlet

    Dividing field values for the average

    I have the numeric field A in Table CALC. I would like to add a column B in which each value is A/AVG(A)..... A B 0.91 1.005079717 0.48 0.528822191 1.37 1.50921702 1.02 1.122162345 0.86 0.954474088 0.35 0.385052138 0.88 0.967094062 1.17 1.288388365 1.12 1.239710074 Thanks for your help!!

Part and Inventory Search

Back
Top