I have this SQL Server query that causes this error
Incorrect syntax near ')'
in my Windows Forms application written in C#.
I think this can cause in different way and I'm stuck at it finding where that syntax error is. It seems the error is around:
datetime2) >= CAST("12/30/1996 12:00:00 AM" as datetime2) and upper(status
Here's my full query
select *
from
(select
PMSEQ, SWERK, EQUNR,
MPTYPE, DATE, TIME,
RECDC, IDIFF, READR,
IIND, QMART
from
P_PM_TBLIF240
where
cast(concat(concat(date, ' '), time) as datetime2) >= cast('12/30/1996 12:00:00 AM' as datetime2)
and upper(status) = 'ACTIVE') a
where
PMSEQ not in ()
Hope someone help to get out here
Thank you in advance