March 18, 2005 at 4:15 am
Hi everyone. Can any one suggest how I could get this query to run under SQL server?
SELECT tblDiaryLog.Id, tblDiaryLog.Ticket_Id, tblDiaryLog.LogTime, IIf(IsNull([name]),[admin],[name]) AS [User], tblDiaryLog.Comment
FROM tblDiaryLog LEFT JOIN tblAdmin ON tblDiaryLog.Admin_Id = tblAdmin.Id
ORDER BY tblDiaryLog.LogTime DESC;
many thanks for any advice.
March 18, 2005 at 5:24 am
Try this
SELECT tblDiaryLog.Id, tblDiaryLog.Ticket_Id, tblDiaryLog.LogTime,
COALESCE([name], [admin]) AS [User], tblDiaryLog.Comment
FROM tblDiaryLog LEFT JOIN tblAdmin ON tblDiaryLog.Admin_Id = tblAdmin.Id
ORDER BY tblDiaryLog.LogTime DESC
Good Hunting!
AJ Ahrens
webmaster@kritter.net
March 18, 2005 at 6:30 am
AJ , many thanks for reply. Works fine , thank you.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply