排序按日期明智的报告问题按日期排列明智报告?
select
liftingbirds, totalweight, avgweight, dcno,
convert(varchar,liftingdate,103) as liftingdate
from
k_LiftingEntryRecords
where
dcno = @dcno
order by
liftingdate desc
在这里,我没有得到订单明智的日报表...当我删除where条件 dcno = @dcno
,然后谈到为了明智的日报表...
select
liftingbirds, totalweight, avgweight, dcno,
convert(varchar,liftingdate,103) as liftingdate
from
k_LiftingEntryRecords
order by
liftingdate desc
其他明智的它不来...像
您的liftingdate列类型是datetime? – Moons
是的,liftdate列是日期时间.. – Sambasiva
请添加示例数据和预期输出 –