In Delphi 2010, when executing the below query, it displays the "Type mismatch in expression" error . But when I run the same query in Interbase, query executed and displaying the records.
Why it is not executing from software??
What I have tried:
Query:
select distinct 'D' x,76 Dlid, Seqno, DLYear, LTime, SigNo , DSigStatus , DDLCS, DRIGS from DIGDATA76 where DRIGS <> -1 and ((( DLYEAR = 2018) And ( LTime > 756141126) or (DLYEAR > 2018)) and ((DLYEAR = 2018 ) And
( LTime <= 761732473) or ( DLYEAR < 2018))) Union All select distinct 'A' x,76 Dlid, Seqno, DLYear, LTime, ASigNo, ASigno AVoltage, LTime DDLCS, LTime DRIGS from ANGDATA76 where ((( DLYEAR = 2018) And ( LTime > 756141126)
or (DLYEAR > 2018)) and ((DLYEAR = 2018 ) And ( LTime <= 761732473) or ( DLYEAR < 2018))) Union All select distinct 'M' x,76 Dlid, Seqno, DLYear, LTime, MByte89, MByteAB a, LTime DDLCS, LTIME DRIGS from MDATA76
where ((( DLYEAR = 2018) And ( LTime > 756141126) or (DLYEAR > 2018)) and ((DLYEAR = 2018 ) And ( LTime <= 761732473) or ( DLYEAR < 2018))) order by 4, 5, 3