|
|
mode值是一样的,因为是临时表嘛,我里面存的是同一物料在库存中不同储位的库存数对于同一物料来说,其发料模式当然是相同的了。
问题是:若表中数据为
code,amount,mode,date
1,100,FIFO,02-12-12
2,200,FIFO,02-12-13
3,300,FIFO,02-12-14
4,400,FIFO,02-12-15
执行语句:
select *
from temp_table
order by
decode(mode,'FIFO', 'date asc','LIFO','date desc');
得不到想要的结果,就是说decode用在order by后面是否支持? |
|