Skip to main content

Hi,

I have an application-server-task setup for job-type = ‘QuickReport’.

When the I runt the task, the generated excel file tell error: “SQL Statement malformed:     :..select statement in quick report..]”

 

Executing the quick report manually doesn’t have any error.

 

Does anybody know about this error and how to handle it?

 

The QR-sql-statement:

    SELECT job_id,
       state,
       t.description,
       procedure_name,
       t.queue_id,
       B.DESCRIPTION, B.PROCESS_NUMBER, B.EXECUTION_PLAN,
       arguments_string,
       LAG (executed,1) OVER (PARTITION BY t.queue_id ORDER BY started) prev_job_executed,
       (started - (LAG (executed,1) OVER (PARTITION BY t.queue_id ORDER BY created)))*24*60*60  time_since_prev_job_executed,
       (started-posted)*24*60*60 wait_for_start,
       (executed-started)*24*60*60 exec_time,
       posted,
       created,
       started,
       executed,
       error_text,
       username,
       t.lang_code,
       progress_info,
       process_id,
       inst_id,
       lang_indep,
       sid,
       serial#,
       schedule_id,
       argument_type,
       long_op_id,
       slno,
       total_work,
       so_far,
       exclude_cleanup
FROM   ifsapp.deferred_job t, IFSAPP.BATCH_QUEUE B
WHERE t.queue_id = b.queue_id
AND TO_CHAR( b.queue_id) =  '&Queue_ID'
AND t.posted > SYSDATE-7

 

P.S.: I have tried to change the format of input parameter like: 

  • AND b.queue_id = ‘&Queue_ID’
  • AND b.queue_id = &Queue_ID
  • AND b.queue_id = TO_NUMBER(‘&Queue_ID’)

-- same error occurs

 

Any feedback will be very appreciated.

 

Thanks and best regards,

~Juni

 

IFS Applications version: App9 UPD14


Found out the cause of issue, the “SELECT” was not on position 1 of  QR’s query-box. (There were  3 empty spaces before the “SELECT” word). 


Found out the cause of issue, the “SELECT” was not on position 1 of  QR’s query-box. (There were  3 empty spaces before the “SELECT” word). 

Very helpfull, It happened to me also and I fixed the issue putting SELECT as the first word in the quick report

regards

 


Reply