I m using Linq to Entities. I have the following query in my code, it includes left outer Join:
var surgeonList = (from item in context.T1_STM_Surgeon.Include("T1_STM_SurgeonTitle")
.Include("OTER").Include("OSLP")
join reptable in context.OSLP on item.Rep equals reptable.SlpCode into surgRepresentative
where item.ID == surgeonId
select new
{
ID = item.ID,
First = item.First,
Last = item.Last,
Rep = (surgRepresentative.FirstOrDefault() != null) ? surgRepresentative.FirstOrDefault().SlpName : "N/A",
Reg = item.OTER.descript,
PrimClinic = item.T1_STM_ClinicalCenter.Name,
Titles = item.T1_STM_SurgeonTitle,
Phone = item.Phone,
Email = item.Email,
Address1 = item.Address1,
Address2 = item.Address2,
City = item.City,
State = item.State,
Zip = item.Zip,
Comments = item.Comments,
Active = item.Active,
DateEntered = item.DateEntered
})
.ToList();
My DEV server has SQL 2008, so the code works just fine. When I moved this code to client s production server - they use SQL 2000, I started getting "Incorrect syntax near ( ".
我曾尝试把供应商Manifest Token改为2000年,在我的编辑档案中,然后我开始“执行这一询问需要PenLY操作员,而后者在2005年8月5日之前没有在服务器的版本中得到支持”。 我把改为2005年,即“接近尾声的yn子”(“回头”)。
任何人都能够帮助我找到工作来实现这一目标?
非常感谢你们。