Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: Alert query not working and getting alert

$
0
0

Hi Shahan,

               Try this

SELECT distinct

T0.[empID] as 'SAP ID', isnull(T0.[firstName],'')

+' '+isnull(T0.[middleName],'')+' '+isnull(T0.[lastName],'') as 'Full Name',T1.firstName,

  T2.[Remarks] AS 'Dept Name',

T0.[U_IQId]as 'New Iqama Id',T1.[U_IQId]as 'Old Iqama Id',

T1.[UpdateDate] as 'Update Date'

 

 

 

 

FROM OHEM T0

LEFT JOIN OUDP T2 ON T0.dept=T2.Code

LEFT JOIN AHEM T1 ON T0.empID = T1.EmpID

WHERE getdate() >= T1.[UpdateDate] AND (T1.[UpdateDate]+2) >= getdate() AND

T0.[U_IQId]<> T1.[U_IQId] and T1.U_IQId IS NOT NULL

 

and let me know the result.

 

Regards,

Manish


Viewing all articles
Browse latest Browse all 9159

Trending Articles