急急急..一个简单的sql语句不知道在Orcle中是否能执行..我这边没的Orcle环境。
我这边有个一个语句,在sql环境下运行没的问题,现在要在Orcle环境下运行,不知道该条语句是否可运行起。请大家建字段,帮我运行一下,在此先谢谢大家咯。
SELECT TOP 8 * FROM( select ROW_NUMBER() OVER(ORDER BY OBU_Name desc)AS RowNumber,* from (select Eng_Name,
(case When OBU_Name='DHQ' or OBU_Name='DTW' then replace(OBU_Name,'D','') else OBU_Name End)
as OBU_Name,Email,(case When OBU_Name='DHQ' or OBU_Name='DTW' then replace(Img_Path,'.jpg','')
else Email end) as GLOBAL_EMPNO,FUNCTION_NAME,TITLE_NAME,TEL From V_GLOBAL_MEMBER_LIST_EMPNO
WHERE (STATUS = 'A' ))tmpTable where 1=1 ) B WHERE RowNumber > 0
------最佳解决方案--------------------不能运行,我给你改了下
SELECT *
FROM (select ROW_NUMBER() OVER(ORDER BY OBU_Name desc) AS RowNumber,tmpTable.*
from (select Eng_Name,
(case
When OBU_Name = 'DHQ' or OBU_Name = 'DTW' then
replace(OBU_Name, 'D', '')
else
OBU_Name
End) as OBU_Name,
Email,
(case
When OBU_Name = 'DHQ' or OBU_Name = 'DTW' then
replace(Img_Path, '.jpg', '')
else
Email
end) as GLOBAL_EMPNO,
FUNCTION_NAME,
TITLE_NAME,