sql求解
select top 10000 * from VIEW_ALMEVT0501 where ( evtdate>='2005-01-17' and evtdate<='2005-02-17' and ActID like '%00%' ) and actid in( select actid from view_usract where property='注册' )
union
select top 10000 * from VIEW_ALMEVT0502 where ( evtdate>='2005-01-17' and evtdate<='2005-02-17' and ActID like '%00%' ) and actid in( select actid from view_usract where property='注册' )
order by
EVTDATE desc,EVTTIME desc
这个sql语句.是两个表,我想去掉union,where后再加上AlmID=@AlmID
表VIEW_ALMEVT0501,VIEW_ALMEVT0502
Thanks