SELECT MAX(DECODE(COL,'1',CODE,'')),MAX(DECODE(COL,'2',CODE,'')) FROM (
SELECT CODE,LNAME,CNAME,PROGUNIT,ROW_NUMBER() OVER(PARTITION BY PROGUNIT ORDER BY PROGUNIT) COL FROM ORDTY WHERE PROGUNIT='SMP')
posted on 2009-07-08 21:55
谭明 阅读(238)
评论(0) 编辑 收藏 所属分类:
Oracle