From用SQL Join连表的写法(单个字段)
2017-04-27 09:37:13 访问(1476) 赞(0) 踩(0)
/*
select
tu.ID, tu.TheName, tu.TheCode,
tu.UserName, tu.PingYin, tu.CallName,
tu.ItemSeq, tu.EmUserTypeV, tu.EmGenderV,
tu.Dep_Id, tu.DepName, tu.Position_Id,
tu.PositionName, tu.Category_Id, tu.CategoryName,
tu.Rank_Id, tu.RankName, tu.RankTitlle,
tu.Birthday, tu.Education_Id, tu.SchoolName,
tu.MajorName, tu.StartTime, tu.Email,
tu.TheTel, tu.EmUserSyncTypeV, tu.TBZD,
tu.TB_Time, tu.Remark, tu.InputUserId,
tu.CreateTime, tu.LastUpdateUserId, tu.UpdateTime
from UTB_SZDF_HR_ZZGL t left join
UTB_SZDF_HR_USER_ITEM tu
on t.User_Item_Id = tu.ID
*/
eKing.SzdfLib.Business.HR.UTB_SZDF_HR_ZZGL
bll = eKing.SzdfLib.Business.HR.UTB_SZDF_HR_ZZGL.instance;
eKing.SzdfLib.Entity.HR.UTB_SZDF_HR_ZZGL
entity
=
new eKing.SzdfLib.Entity.HR.UTB_SZDF_HR_ZZGL();
eKing.SzdfLib.Entity.HR.UTB_SZDF_HR_USER_ITEM
userEntity
=
new eKing.SzdfLib.Entity.HR.UTB_SZDF_HR_USER_ITEM();
IFromTableDriver ifrom = entity;
ISelectDriver iselect = entity;
ifrom.AddIFromTableItemWithBaseEntity
(
"tu", userEntity, SlowX.Core.Enums.SqlJoin.EmSqlJoin.LeftJoin,
entity._User_Item_Id,
userEntity._ID
);
DBInvokeParameter dbInvoke = bll.BuildDBInvokeParameterList(entity, xdbHelper);
if (dbInvoke == null)
return OperResult.ToSucc("null");
else
return OperResult.ToSucc(dbInvoke.SQL);
标签:
From用SQL Join连表的写法(单个字段) 


上一条:
下一条:
相关评论
发表评论