Skip to main content
Solved

SQL Statement Malformed Error in Appl. Server Task - JobType = QuickReport


Forum|alt.badge.img+4

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

 

Best answer by anqjusinl

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). 

View original

Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • June 9, 2020

IFS Applications version: App9 UPD14


Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • June 9, 2020

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). 


Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • May 27, 2024
anqjusinl wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings