Converting basic EffDt query to SQL 92 standard | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Converting basic EffDt query to SQL 92 standard

How would I convert this query to ANSI 92 standard? select p.InternalID,
n.LastName
from tblPatient p,
tblName n
where p.PatientID = n.EntID and
n.EffDt = (
select max(n2.EffDt) from tblName n2 where n.EntID = n2.EntID and n2.EffDt <= getdate()
)
If I see this right, just replace GETDATE() with CURRENT_TIMESTAMP —
Frank
http://www.insidesql.de

Oh, one more. You should be explicite on you INNER JOIN and move the join condition away from the WHERE clause. [<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br /><br />–<br />Frank<br /<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a><br />
]]>