Skip to Content
0
Former Member
Jun 14, 2016 at 05:54 AM

Function Call in SQL-Statement

26 Views

Hi everybody,

todays heavy issue:

in my jasper sql, there is a function call about a description (could be a very long text over more than 4 database fields) in the database. The sql is like this:

select

incident.incident_id,

incident.incident_ref,

inc_data.event_type,

inc_data.sub_event_type,

incident.date_logged,

inc_cat.inc_cat_sc,

incident.inc_resolve_act,

DESCRIPTION(incident.incident_id) RFC_DESC,

item.item_sc,

incident.inc_chk_ref,

serv_dept.serv_dept_sc,

sectn_dept.sectn_dept_sc

from

incident

join inc_data on incident.incident_id = inc_data.incident_id

join item on incident.item_id = item.item_id

join inc_cat on incident.cause_id = inc_cat.inc_cat_id

JOIN assyst_usr ON incident.assyst_usr_id = assyst_usr.assyst_usr_id

JOIN serv_dept ON incident.ass_svd_id = serv_dept.serv_dept_id

JOIN usr ON incident.aff_usr_id = usr.usr_id

JOIN sectn_dept ON usr.sectn_dept_id = sectn_dept.sectn_dept_id

where

(incident.csg_id = '1' or incident.csg_id = '7') AND

(inc_data.event_type = 'i' OR inc_data.event_type = 'c' OR inc_data.event_type = 'p') AND

item.item_sc = 'S-AUSLAENDERWESEN' AND

incident.inc_status = 'o' AND

sectn_dept.sectn_dept_sc LIKE 'KVR%'

If I try to apply, I get the following error message:

How can I handle something like this?

Thanks in advance for your support.

Rgds

Eberhard