Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2012
    Posts
    3

    Unanswered: Sqlplus queries problem.... [urgent]

    hi i'm new to SQL plus queries statement and i have the foloowing query that doesnt seems to work well...

    SELECT C.CUST_ID, P.SERVICE_TOTAL, O.ORDER_TOTAL, E.SERVICE_NUMBER, E.SERVICE_DESC
    FROM CUSTOMER C, PAYMENT P, ORDERS O, EXTENDED_SERVICE E, RESERVATION R, CHECK_IN I, ORDER_LINE N, MEMBERSHIP M

    WHERE.............

    HAVING ORDER_TOTAL>50.00;


    error occur when i try to use 'HAVING ORDER>50.00"...... CAN ANYBODY KNOW HOW TO SOLVE THIS PROBLEM ??

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Did you try
    Code:
    where order_total > 50

  3. #3
    Join Date
    Jul 2012
    Posts
    3
    How do i implement group by and having together in this queries ??

  4. #4
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    There's an example on this page:

    Oracle Group By Having SQL PL/SQL
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    But, there's nothing to "group by" in your query (at least, I don't see any reason for that).

    Otherwise, you'd (probably) have SUM(O.ORDER_TOTAL) and the rest of the columns would have to be specified in the GROUP BY clause.

Posting Permissions

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