大家好我有如下
ID FedTaxID RegularPay Payperiodnumber
1 562545366 500 1
2 562545366 501 1
3 562545366 5000 2
我想我的表数据得到我的数据如下
ID FedTaxID RegularPay Payperiodnumber
2 562545366 501 1
3 562545366 5000 2
我尝试了一些东西一样如下,但我没有得到需要的结果
select max(id) ID,regularpay,fedtaxid,payperiodnumber
from tblemployeegrosswagesn1 where fedtaxid="562545366"
group by payperiodnumber
having count(*) >= 1;
任何一个可以帮助我
http://stackoverflow.com/questions/1313120/ – newtover 2012-01-17 12:33:16
'newtover'完美的感谢:-) – Dotnet 2012-01-17 12:38:05