Posted on: 6/12/2014 2:58:40 AM | Views : 390

Select Device_Person_id,personal_id,Date1,( cASE WHEN eXISTS( sELECT Device_Person_id FROM tempDeviceLogs AT WHERE T.personal_id=AT.Device_Person_id AND T.date1=AT.logDateTime ) then 'P' Else 'A' End )as Emp_Status FROM ( Select Device_Person_id,personal_id,Cast(logDateTime as DATE)AS DATE1 from Emp_setting a,(Select Distinct logDateTime from tempDeviceLogs) b ) T it causing error like "Invalid column name 'Device_Person_id'."
how inout can be used in this query to get result.
this is my first project don't have much idea so please help me.
dbo.tempDeviceLogs table
columnname datatype allownulls LogsID int Unchecked Device_Person_id int Unchecked Device_id int Unchecked logDateTime datetime Unchecked logVerifyMode nchar(10) Unchecked workCodeID int Unchecked Machin_install_id int Unchecked data_l ...

Go to the complete details ...