Results 1 to 3 of 3

Thread: help with using Group by clause

  1. #1
    Join Date
    Apr 2009
    Posts
    4

    Question help with using Group by clause

    I am running the following query, and getting an error


    select office_code, sum(exam1_cost) as RgnLabCost, avg(exam1_cost) as AvgRgnLabCost, sum(exam2_cost) as RgnPhysCost, avg(exam2_cost) as AvgRgnPhysCost
    From MasterExam
    Group by office_code

    error message:

    The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.

    Null Pointers are another name for undefined values.



    this being run against oracle 10g db.

    the order by field has no NULL values, of course some of the costs fields are null but that is it.

    any ideas what is throwing the error?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Are you sure cost column is throwing the error, can you remove avg cost from the query and try it to see if error goes away

  3. #3
    Join Date
    Apr 2009
    Posts
    4
    if I remove the office code and group by clause, then it runs fine.

Posting Permissions

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