Incorrect syntax near the keyword 'From'.

p.peter16.07

Benutzer
Beiträge
11
Warum gibt es hier ein Problem ?

komm nicht weiter:

--DECLARE @date DATE = GETDATE()

--DECLARE @date7 DATE = (GETDATE() - 30)

SELECT
i.csg_sc AS Mandant,
i.incident_ref,
cat.inc_cat_n AS Kategorie,
format(i.date_logged, 'dd.MM.yy hh:mm') date_logged,
CASE i.inc_status
WHEN 'o' THEN 'offen'
WHEN 'c' THEN 'geschlossen'
WHEN 'P' THEN 'pausiert'
ELSE i.inc_status
END AS Status,
i.inc_close_date,
i.aff_usr_name AS 'Betroffener Name',
i.short_desc AS Beschreibung,
svd.serv_dept_n,
--mstat.serv_time_spoc,
--mstat.service_time_all,
mac.service_time,
--asu.assyst_usr_n,
--format(mac.date_actioned, 'dd.MM.yy hh:mm') Aktionsdatum,
--mac.act_type_n

From
dbo.incident i,
dbo.serv_dept svd,
dbo.inc_cat cat,
dbo.merentis_incident_stats mstat,
dbo.merentis_action mac,
dbo.assyst_usr asu

Where

mac.serv_dept_sc=svd.serv_dept_sc
AND i.inc_cat_id=cat.inc_cat_id
AND i.incident_id=mstat.incident_id
--AND i.incident_id=mac.incident_id
AND mac.assyst_usr_id=asu.assyst_usr_id


--AND mac.date_actioned between @date7 and @date
AND i.inc_close_date between '2021-10-01' and '2021-11-01'
AND i.csg_sc in ('AMPLEON','AMPLEON-PH','MERENTIS','DRK')
AND svd.serv_dept_n in ('MT IT-Operation' , 'MT Interne IT')
AND asu.serv_dept_id = 37
AND mac.service_time >0
AND i.inc_status = 'c'

order by i.incident_ref
--order by inc_close_date
 

Anhänge

  • Error.png
    Error.png
    23,5 KB · Aufrufe: 4
Werbung:
Werbung:
Zurück
Oben