Results 1 to 2 of 2
  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
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    If you are using SQL*Plus (which is Oracle) why do you post in the MySQL forum?

    To add a condition on a specific column you need to use WHERE order_total > 50.

    Having is for conditions on groups (created by GROUP BY).
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

Posting Permissions

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