Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    3

    Question Unanswered: ORA-00933: SQL command not properly ended

    Hi,

    I'm in the process of updating a Crystal Report. The report has a couple parameters, {?SDate} and {?EDate}, to be entered by the user. The parameter feeds into the QE.ACTUAL_COMP_DATE. The parameter is currently a string type. I'm trying to change it to be a date type so that the user could have a calendar to select the date from when entering the parameter. But the problem is that when I change the parameter type from string to date and run the report I get the following error:

    "Failed to open a rowset.
    Details: HY000: [Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended"

    Can someone help? The SQL command is below:


    SELECT DISTINCT
    QE.QUEUE_ID,
    QE.SHOP_ORDER_ID,
    SO.PART_ID,
    SO.USER_ATT8,
    SO.SHOP_ORDER_STATUS,
    (Select Max(q.ACTUAL_COMP_DATE) from Itcm.Queue_Entry q, itcm.object_status o where q.shop_order_id = QE.shop_order_id and q.shop_order_suffix = QE.shop_order_suffix and q.queue_id = qe.queue_id and q.object_id = o.object_id and q.queue_entry_Status = o.status_name group by
    q.shop_order_id, q.queue_id having max(o.status_flags) = 32 and min(o.status_flags) = 32
    ) AS COMP_DATE

    FROM ITCM.QUEUE_ENTRY QE, ITCM.SHOP_ORDER SO
    WHERE QE.SHOP_ORDER_ID = SO.SHOP_ORDER_ID AND QE.SHOP_ORDER_SUFFIX = SO.SHOP_ORDER_SUFFIX and QE.ACTUAL_COMP_DATE >= '{?SDate}' and QE.ACTUAL_COMP_DATE <= '{?EDate}'
    Last edited by acanals; 05-31-06 at 14:25. Reason: Need to ID the post as a question for help

  2. #2
    Join Date
    May 2006
    Posts
    3

    Question

    I'm meant to post this as a question.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I don't use Crystal Report so this might not help at all ...

    Does your "real" query also have an empty line between "AS COMP DATE" and "FROM itcm.queue_entry" lines? If so, could it be that this confuses Crystal Report? Try to delete this empty line.

    Also, does this product support subquery as an item in report?

    SELECT (SELECT ... FROM ...) AS comp_date FROM ...

    What happens if you omit COMP_DATE query?

    And, just to observe, date WHERE clause could be shortened into

    ... AND qe.actual_comp_date BETWEEN '{?SDate}' AND '{?EDate}'

Posting Permissions

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