Hi,
Couldn't execute query. The multi-part identifier "MsSecurityWeekEnd.EmployeeID" could not be bound. – SELECT count(*) as c FROM ( SELECT * FROM ( SELECT a.EmployeeID ,(FirstName+' '+LastName) AS EmployeeName ,a.WeekEndDate ,a.RBU ,a.RBT FROM MsSecurityWeekEnd a LEFT JOIN MsEmployee b ON a.EmployeeID=b.EmployeeID ) a WHERE 1=1 AND MsSecurityWeekEnd.EmployeeID LIKE '%2%') pg_tmp
this worked for searching EmployeeName but not for EmployeeID.
any idea how to make it worked?
thx
Hi,
ok i get it to worked with modified SQL.
SELECT
MsSecurityWeekEnd.EmployeeID
,(FirstName+' '+LastName) AS EmployeeName
,MsSecurityWeekEnd.WeekEndDate
,MsSecurityWeekEnd.RBU
,MsSecurityWeekEnd.RBT
FROM MsSecurityWeekEnd
LEFT JOIN MsEmployee ON MsSecurityWeekEnd.EmployeeID=MsEmployee.EmployeeID
Now the problem is : i cannot use the autofilter the EmployeeName.
it returns error :
Couldn't execute query. Invalid column name 'EmployeeName'. – SELECT count(*) as c FROM ( SELECT MsSecurityWeekEnd.EmployeeID ,(FirstName+' '+LastName) AS EmployeeName ,MsSecurityWeekEnd.WeekEndDate ,MsSecurityWeekEnd.RBU ,MsSecurityWeekEnd.RBT FROM MsSecurityWeekEnd LEFT JOIN MsEmployee ON MsSecurityWeekEnd.EmployeeID=MsEmployee.EmployeeID WHERE 1=1 AND EmployeeName LIKE '%l%')
and another questions? can i use alias name in SQL for table actually?
thx