*号那个地方报错[/quote]
噢噢
hsql=" from Xa where id in (select id from Xa as x where x.Did='" + did + "' and x.Pid='" + pid + "'order by Date desc) order by Time desc"
这样应该就可以了,再试试,这个id是主键列[/quote]
这样实际上没有对Date排,只是对Time排了[/quote]
排了呀,先对date排,再对time排 。对date排是里面是那个子查询 对time排是外面那个查询 ,先对Date排序,再对Time排序 不是这样的么?[/quote]
我试过的,只是对Time排序,除非对Date字段用group by,才是先对Date排,再对Time排,但是我不知道hsql的这种语句应该怎样写
*号那个地方报错[/quote]
噢噢
hsql=" from Xa where id in (select id from Xa as x where x.Did='" + did + "' and x.Pid='" + pid + "'order by Date desc) order by Time desc"
这样应该就可以了,再试试,这个id是主键列[/quote]
这样实际上没有对Date排,只是对Time排了[/quote]
排了呀,先对date排,再对time排 。对date排是里面是那个子查询 对time排是外面那个查询 ,先对Date排序,再对Time排序 不是这样的么?
*号那个地方报错[/quote]
噢噢
hsql=" from Xa where id in (select id from Xa as x where x.Did='" + did + "' and x.Pid='" + pid + "'order by Date desc) order by Time desc"
这样应该就可以了,再试试,这个id是主键列[/quote]
这样实际上没有对Date排,只是对Time排了
*号那个地方报错[/quote]
噢噢
hsql=" from Xa where id in (select id from Xa as x where x.Did='" + did + "' and x.Pid='" + pid + "'order by Date desc) order by Time desc"
这样应该就可以了,再试试,这个id是主键列