J
JasRain
The following works in SQL 2000 but returns a message stating "Pass-Thru
query with ReturnsRecords property set to True did not return any records"
Any idea why?
DECLARE @MyMonth VARCHAR(2)
IF Month(GetDate())-1 = 0
Set @MyMonth = '12'
ELSE
Set @MyMonth = MONTH(GETDATE())-1
Select
RTRIM(C.Description) as FacName,
RTRIM(E.EmployeeNum) as EmployeeNum,
E.RIFDate = '1901-01-01'
ET.TerminateSecurityDate
FROM Employee E
LEFT JOIN Company C
ON E.FacilityID = C.FacilityID
LEFT JOIN EmpTermination ET
ON E.FacilityID = ET.FacilityID AND
E.SSN = ET.SSN
Where
(Month(E.RifDate) = @MyMonth OR
month(ET.TerminateSecurityDate) = @MyMonth)
AND E.ASTTAITValue <> 'T'
Order By E.FacilityID, E.SSN
query with ReturnsRecords property set to True did not return any records"
Any idea why?
DECLARE @MyMonth VARCHAR(2)
IF Month(GetDate())-1 = 0
Set @MyMonth = '12'
ELSE
Set @MyMonth = MONTH(GETDATE())-1
Select
RTRIM(C.Description) as FacName,
RTRIM(E.EmployeeNum) as EmployeeNum,
E.RIFDate = '1901-01-01'
ET.TerminateSecurityDate
FROM Employee E
LEFT JOIN Company C
ON E.FacilityID = C.FacilityID
LEFT JOIN EmpTermination ET
ON E.FacilityID = ET.FacilityID AND
E.SSN = ET.SSN
Where
(Month(E.RifDate) = @MyMonth OR
month(ET.TerminateSecurityDate) = @MyMonth)
AND E.ASTTAITValue <> 'T'
Order By E.FacilityID, E.SSN