select * from ProjectFeature pf
inner join ProjectArea pa
on pa.AreaId = pf.AreaId
inner join Project p
on p.ProjectId = pa.ProjectId
where (p.ProjectId=175 AND pf.FeatureStatusTypeId=2
AND (pf.FeatureId IN (SELECT dbo.[MaxFeatureVersoinId](pf.FeatureId) AS [FeatureId])) AND (pf.FeatureId IN (SELECT dbo.[MaxFeatureVersoinId](pf.FeatureId) AS [FeatureId])))
我有另一个问题
select * from ProjectFeature pf
inner join ProjectArea pa
on pa.AreaId = pf.AreaId
inner join Project p
on p.ProjectId = pa.ProjectId
where (p.ProjectId=175 AND pf.FeatureStatusTypeId=2
AND (pf.FeatureId IN (SELECT dbo.[MaxFeatureVersoinId](pf.FeatureId) AS [FeatureId])) AND (pf.FeatureId IN (SELECT dbo.[MaxFeatureVersoinId](pf.ChangeRequestToFeatureId) AS [FeatureId])))
第二个查询完全相同,但该函数在查询的最后采用另一个字段
我已经尝试过 UNION 运算符,但 LLBLGEN pro 不支持 UNION 运算符我怎样才能使这个 int oa 成为检索两个结果集的单个查询?